From e0cf98b1eddf77e03d4632eaf312d1ae759958fe Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 12 Sep 2018 21:58:38 -0400 Subject: [PATCH] Missed a case where fish could load chunks --- ...-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/Spigot-Server-Patches/0368-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch b/Spigot-Server-Patches/0368-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch index 98552a1e2..a9471ae84 100644 --- a/Spigot-Server-Patches/0368-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch +++ b/Spigot-Server-Patches/0368-Prevent-Mob-AI-Rules-from-Loading-Chunks.patch @@ -1,4 +1,4 @@ -From 7074177957c35a70e19afa8d54ca1ac233524dfc Mon Sep 17 00:00:00 2001 +From d084c3abef084cb894059e7755a1062d4aca0b24 Mon Sep 17 00:00:00 2001 From: Aikar Date: Mon, 10 Sep 2018 23:56:36 -0400 Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks @@ -63,10 +63,18 @@ index b1661693cf..2cbb6c8f91 100644 } } diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -index 800e0046a8..7bece2ccbf 100644 +index 800e0046a8..bfa6c2eef8 100644 --- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java +++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java -@@ -141,6 +141,7 @@ public class RandomPositionGenerator { +@@ -78,6 +78,7 @@ public class RandomPositionGenerator { + } + + BlockPosition blockposition2 = new BlockPosition((double)j1 + entitycreature.locX, (double)k1 + entitycreature.locY, (double)l1 + entitycreature.locZ); ++ if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper + if ((!flag1 || entitycreature.f(blockposition2)) && navigationabstract.a(blockposition2)) { + if (!flag) { + blockposition2 = a(blockposition2, entitycreature); +@@ -141,6 +142,7 @@ public class RandomPositionGenerator { } private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) {