Fixed issue with default implementation of Beach plant type check
This commit is contained in:
parent
6dafa3d0c2
commit
8bbe281de9
|
@ -870,10 +870,10 @@
|
||||||
+ case Water: return world.getBlockMaterial(x, y, z) == Material.water && world.getBlockMetadata(x, y, z) == 0;
|
+ case Water: return world.getBlockMaterial(x, y, z) == Material.water && world.getBlockMetadata(x, y, z) == 0;
|
||||||
+ case Beach:
|
+ case Beach:
|
||||||
+ boolean isBeach = (blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.sand.blockID);
|
+ boolean isBeach = (blockID == Block.grass.blockID || blockID == Block.dirt.blockID || blockID == Block.sand.blockID);
|
||||||
+ boolean hasWater = (world.getBlockMaterial(x - 1, y - 1, z ) == Material.water ||
|
+ boolean hasWater = (world.getBlockMaterial(x - 1, y, z ) == Material.water ||
|
||||||
+ world.getBlockMaterial(x + 1, y - 1, z ) == Material.water ||
|
+ world.getBlockMaterial(x + 1, y, z ) == Material.water ||
|
||||||
+ world.getBlockMaterial(x, y - 1, z - 1) == Material.water ||
|
+ world.getBlockMaterial(x, y, z - 1) == Material.water ||
|
||||||
+ world.getBlockMaterial(x, y - 1, z + 1) == Material.water);
|
+ world.getBlockMaterial(x, y, z + 1) == Material.water);
|
||||||
+ return isBeach && hasWater;
|
+ return isBeach && hasWater;
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|
Loading…
Reference in New Issue