Check the block water mobs spawn in, not the block under

This commit is contained in:
Zach Brown 2016-04-15 15:49:39 -05:00
parent 82c08cfbda
commit d42782457e

View file

@ -18,9 +18,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ int i = MathHelper.floor(this.locX);
+ int j = MathHelper.floor(this.getBoundingBox().b); // minY of bounding box
+ int k = MathHelper.floor(this.locZ);
+ Block below = this.world.getType(new BlockPosition(i, j, k).down()).getBlock();
+ Block block = this.world.getType(new BlockPosition(i, j, k)).getBlock();
+
+ return below == Blocks.WATER || below == Blocks.FLOWING_WATER;
+ return block == Blocks.WATER || block == Blocks.FLOWING_WATER;
+ // Paper end
}