mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Check the block water mobs spawn in, not the block under
This commit is contained in:
parent
82c08cfbda
commit
d42782457e
1 changed files with 2 additions and 2 deletions
|
@ -18,9 +18,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ int i = MathHelper.floor(this.locX);
|
+ int i = MathHelper.floor(this.locX);
|
||||||
+ int j = MathHelper.floor(this.getBoundingBox().b); // minY of bounding box
|
+ int j = MathHelper.floor(this.getBoundingBox().b); // minY of bounding box
|
||||||
+ int k = MathHelper.floor(this.locZ);
|
+ 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
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue