Copied over changes from 1.8.9 version
This commit is contained in:
parent
2d0653c64c
commit
d8ecc2d352
2 changed files with 14 additions and 4 deletions
|
@ -185,11 +185,15 @@ public class AchievementEventHandler
|
||||||
Block block = Block.getBlockFromItem(item);
|
Block block = Block.getBlockFromItem(item);
|
||||||
IBlockState state = block != null ? block.getStateFromMeta(stack.getItemDamage()) : null;
|
IBlockState state = block != null ? block.getStateFromMeta(stack.getItemDamage()) : null;
|
||||||
|
|
||||||
//Yggdrasil
|
try
|
||||||
if (state == BlockBOPSapling.paging.getVariantState(BOPTrees.SACRED_OAK))
|
|
||||||
{
|
{
|
||||||
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,6 +95,7 @@ import net.minecraft.world.biome.BiomeColorHelper;
|
||||||
import net.minecraftforge.common.EnumPlantType;
|
import net.minecraftforge.common.EnumPlantType;
|
||||||
import net.minecraftforge.fluids.BlockFluidBase;
|
import net.minecraftforge.fluids.BlockFluidBase;
|
||||||
import net.minecraftforge.fluids.Fluid;
|
import net.minecraftforge.fluids.Fluid;
|
||||||
|
import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||||
import net.minecraftforge.fluids.FluidRegistry;
|
import net.minecraftforge.fluids.FluidRegistry;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
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");
|
blood_bucket = ModItems.registerItem((new ItemBucket(blood)).setContainerItem(Items.bucket), "blood_bucket");
|
||||||
poison_bucket = ModItems.registerItem((new ItemBucket(poison)).setContainerItem(Items.bucket), "poison_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");
|
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)
|
public static Block registerFluidBlock(Fluid fluid, BlockFluidBase fluidBlock, String name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue