Merge branch 'BOP-1.10.2-5.0.x' of https://github.com/Glitchfiend/BiomesOPlenty into BOP-1.10.2-5.0.x

This commit is contained in:
Forstride 2016-08-18 16:42:08 -04:00
commit 796dfad992

View file

@ -42,10 +42,12 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenTrees;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.common.EnumPlantType;
import net.minecraftforge.common.IPlantable;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable {
public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable, IPlantable {
protected static final AxisAlignedBB BOUNDING_BOX = new AxisAlignedBB(0.09999999403953552D, 0.0D, 0.09999999403953552D, 0.8999999761581421D, 0.800000011920929D, 0.8999999761581421D);
@ -339,6 +341,15 @@ public class BlockBOPSapling extends BlockBOPDecoration implements IGrowable {
return success;
}
@Override
public EnumPlantType getPlantType(IBlockAccess world, BlockPos pos) {
return EnumPlantType.Plains;
}
@Override
public IBlockState getPlant(IBlockAccess world, BlockPos pos) {
IBlockState state = world.getBlockState(pos);
if (state.getBlock() != this) return getDefaultState();
return state;
}
}