Copied over changes from 1.8.9 version

This commit is contained in:
Adubbz 2016-03-25 19:34:58 +11:00
parent 2d0653c64c
commit d8ecc2d352
2 changed files with 14 additions and 4 deletions

View file

@ -185,11 +185,15 @@ public class AchievementEventHandler
Block block = Block.getBlockFromItem(item);
IBlockState state = block != null ? block.getStateFromMeta(stack.getItemDamage()) : null;
//Yggdrasil
if (state == BlockBOPSapling.paging.getVariantState(BOPTrees.SACRED_OAK))
try
{
event.getPlayer().addStat(BOPAchievements.grow_sacred_oak);
//Yggdrasil
if (state == BlockBOPSapling.paging.getVariantState(BOPTrees.SACRED_OAK))
{
event.getPlayer().addStat(BOPAchievements.grow_sacred_oak);
}
}
catch(Exception e) {} //Fail quietly if there's a problem matching metadata to a block state
}
}

View file

@ -95,6 +95,7 @@ import net.minecraft.world.biome.BiomeColorHelper;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.fluids.BlockFluidBase;
import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.fml.relauncher.Side;
@ -313,8 +314,13 @@ public class ModBlocks
blood_bucket = ModItems.registerItem((new ItemBucket(blood)).setContainerItem(Items.bucket), "blood_bucket");
poison_bucket = ModItems.registerItem((new ItemBucket(poison)).setContainerItem(Items.bucket), "poison_bucket");
hot_spring_water_bucket = ModItems.registerItem((new ItemBucket(hot_spring_water)).setContainerItem(Items.bucket), "hot_spring_water_bucket");
}
FluidContainerRegistry.registerFluidContainer(honey_fluid, new ItemStack(honey_bucket));
FluidContainerRegistry.registerFluidContainer(blood_fluid, new ItemStack(blood_bucket));
FluidContainerRegistry.registerFluidContainer(poison_fluid, new ItemStack(poison_bucket));
FluidContainerRegistry.registerFluidContainer(hot_spring_water_fluid, new ItemStack(hot_spring_water_bucket));
}
public static Block registerFluidBlock(Fluid fluid, BlockFluidBase fluidBlock, String name)
{