diff options
author | Zach Brown <[email protected]> | 2017-04-29 05:27:31 -0500 |
---|---|---|
committer | Zach Brown <[email protected]> | 2017-04-29 05:27:31 -0500 |
commit | 974b0afca91844fed61c5fda9293bbcd88752c2f (patch) | |
tree | d3a7b65e14f34b7cc8928efaf6403f67eaaaf708 /Spigot-Server-Patches/0115-Water-mobs-should-only-spawn-in-the-water.patch | |
parent | 8b2122a291e3ea68f0e1516209914ef43a2d55e9 (diff) | |
download | Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.tar.gz Paper-974b0afca91844fed61c5fda9293bbcd88752c2f.zip |
Remove last bit of chunk exists region file fix
CraftBukkit removed their implementation that caused this issue,
switching to Mojang's implementation which doesn't appear to share it. I
already removed the important bit in the last upstream merge, this is
just unused and unnecessary now. So we remove it.
Diffstat (limited to 'Spigot-Server-Patches/0115-Water-mobs-should-only-spawn-in-the-water.patch')
-rw-r--r-- | Spigot-Server-Patches/0115-Water-mobs-should-only-spawn-in-the-water.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0115-Water-mobs-should-only-spawn-in-the-water.patch b/Spigot-Server-Patches/0115-Water-mobs-should-only-spawn-in-the-water.patch new file mode 100644 index 0000000000..8f48e60239 --- /dev/null +++ b/Spigot-Server-Patches/0115-Water-mobs-should-only-spawn-in-the-water.patch @@ -0,0 +1,30 @@ +From adfe939e1377279c32fe68488f5285302613c9ba Mon Sep 17 00:00:00 2001 +From: Zach Brown <[email protected]> +Date: Thu, 14 Apr 2016 17:48:56 -0500 +Subject: [PATCH] Water mobs should only spawn in the water + + +diff --git a/src/main/java/net/minecraft/server/EntityWaterAnimal.java b/src/main/java/net/minecraft/server/EntityWaterAnimal.java +index 90d33af95..251555713 100644 +--- a/src/main/java/net/minecraft/server/EntityWaterAnimal.java ++++ b/src/main/java/net/minecraft/server/EntityWaterAnimal.java +@@ -11,7 +11,15 @@ public abstract class EntityWaterAnimal extends EntityInsentient implements IAni + } + + public boolean cM() { +- return true; ++ // Paper start - Don't let water mobs spawn in non-water blocks ++ // Based around EntityAnimal's implementation ++ int i = MathHelper.floor(this.locX); ++ int j = MathHelper.floor(this.getBoundingBox().b); // minY of bounding box ++ int k = MathHelper.floor(this.locZ); ++ Block block = this.world.getType(new BlockPosition(i, j, k)).getBlock(); ++ ++ return block == Blocks.WATER || block == Blocks.FLOWING_WATER; ++ // Paper end + } + + public boolean canSpawn() { +-- +2.12.2.windows.2 + |