Fixed replacement of plant blocks

This commit is contained in:
Adubbz 2016-01-02 16:33:23 +11:00
parent 3cb854eea2
commit f188396c99

View file

@ -214,6 +214,22 @@ public class BlockBOPPlant extends BlockBOPDecoration implements IShearable
} }
} }
@Override
public boolean isReplaceable(World world, BlockPos pos)
{
IBlockState state = world.getBlockState(pos);
BOPPlants plant = (BOPPlants) state.getValue(this.variantProperty);
switch (plant)
{
case THORN: case WILDRICE: case CATTAIL: case RIVERCANE: case TINYCACTUS: case WITHERWART:
return false;
default:
return true;
}
}
@Override @Override
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
public boolean addDestroyEffects(World world, BlockPos pos, net.minecraft.client.particle.EffectRenderer effectRenderer) public boolean addDestroyEffects(World world, BlockPos pos, net.minecraft.client.particle.EffectRenderer effectRenderer)