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:
commit
796dfad992
1 changed files with 14 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue