Made worms work with other grass and dirt types too. I hope.

Closes #338
This commit is contained in:
Ellpeck 2016-11-07 22:52:54 +01:00
parent 5c5829d503
commit 2e96e00182

View file

@ -32,7 +32,7 @@ public class EntityWorm extends Entity{
public static boolean canWormify(World world, BlockPos pos, IBlockState state){ public static boolean canWormify(World world, BlockPos pos, IBlockState state){
Block block = state.getBlock(); Block block = state.getBlock();
boolean rightBlock = block instanceof BlockFarmland || block == Blocks.GRASS || block == Blocks.GRASS_PATH || (block == Blocks.DIRT && state.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT); boolean rightBlock = block instanceof BlockFarmland || block instanceof BlockDirt || block instanceof BlockGrass;
if(rightBlock){ if(rightBlock){
BlockPos posUp = pos.up(); BlockPos posUp = pos.up();
IBlockState stateUp = world.getBlockState(posUp); IBlockState stateUp = world.getBlockState(posUp);