Fixed a crash with BlockBOPGrass. Closes #611

This commit is contained in:
Adubbz 2016-01-19 16:13:24 +11:00
parent b62004dd85
commit 51e3ea319e

View file

@ -148,10 +148,10 @@ public class BlockBOPGrass extends BlockGrass implements IBOPBlock, ISustainsPla
// support beach plants if there's water alongside
case Beach:
return (
world.getBlockState(pos.east()).getBlock().getMaterial() == Material.water ||
world.getBlockState(pos.west()).getBlock().getMaterial() == Material.water ||
world.getBlockState(pos.north()).getBlock().getMaterial() == Material.water ||
world.getBlockState(pos.south()).getBlock().getMaterial() == Material.water
(!world.isAirBlock(pos.east()) && world.getBlockState(pos.east()).getBlock().getMaterial() == Material.water) ||
(!world.isAirBlock(pos.west()) && world.getBlockState(pos.west()).getBlock().getMaterial() == Material.water) ||
(!world.isAirBlock(pos.north()) && world.getBlockState(pos.north()).getBlock().getMaterial() == Material.water) ||
(!world.isAirBlock(pos.south()) && world.getBlockState(pos.south()).getBlock().getMaterial() == Material.water)
);
// don't support nether plants, water plants, or crops (require farmland), or anything else by default
default: