From 1e3de9e936c0a0db60d919809627682ea30a8290 Mon Sep 17 00:00:00 2001 From: Aikar Date: Tue, 5 Jun 2018 00:33:24 -0400 Subject: [PATCH] Don't load chunks for villager door checks This avoids villages spam loading chunks sync --- ...load-chunks-for-villager-door-checks.patch | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Spigot-Server-Patches/0300-Don-t-load-chunks-for-villager-door-checks.patch diff --git a/Spigot-Server-Patches/0300-Don-t-load-chunks-for-villager-door-checks.patch b/Spigot-Server-Patches/0300-Don-t-load-chunks-for-villager-door-checks.patch new file mode 100644 index 0000000000..5af69ab2a3 --- /dev/null +++ b/Spigot-Server-Patches/0300-Don-t-load-chunks-for-villager-door-checks.patch @@ -0,0 +1,28 @@ +From 8159283895fa3fc65c9d1ab0d3e1ad67a1c9fe9c Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Tue, 5 Jun 2018 00:32:22 -0400 +Subject: [PATCH] Don't load chunks for villager door checks + +This avoids villages spam loading chunks sync + +diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java +index 01f7cee38..a3aa9f82e 100644 +--- a/src/main/java/net/minecraft/server/PersistentVillage.java ++++ b/src/main/java/net/minecraft/server/PersistentVillage.java +@@ -226,7 +226,12 @@ public class PersistentVillage extends PersistentBase { + } + + private boolean f(BlockPosition blockposition) { +- IBlockData iblockdata = this.world.getType(blockposition); ++ // Paper start ++ IBlockData iblockdata = this.world.getTypeIfLoaded(blockposition); ++ if (iblockdata == null) { ++ return false; ++ } ++ // Paper end + Block block = iblockdata.getBlock(); + + return block instanceof BlockDoor ? iblockdata.getMaterial() == Material.WOOD : false; +-- +2.17.1 +