diff --git a/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java b/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java index 123c6f098..e896a6867 100644 --- a/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java +++ b/src/main/java/biomesoplenty/common/handler/AchievementEventHandler.java @@ -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 } } diff --git a/src/main/java/biomesoplenty/common/init/ModBlocks.java b/src/main/java/biomesoplenty/common/init/ModBlocks.java index cb26334b7..ab83f2591 100644 --- a/src/main/java/biomesoplenty/common/init/ModBlocks.java +++ b/src/main/java/biomesoplenty/common/init/ModBlocks.java @@ -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) {