From 7114dbbb9d14b0403bd8438679ead0adb66e3ace Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 17 Dec 2018 21:36:21 +1100 Subject: [PATCH] SPIGOT-4534: Only call event for new chunks By: md_5 --- paper-server/nms-patches/Chunk.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/nms-patches/Chunk.patch b/paper-server/nms-patches/Chunk.patch index bec33360b..f7b4aa9eb 100644 --- a/paper-server/nms-patches/Chunk.patch +++ b/paper-server/nms-patches/Chunk.patch @@ -149,7 +149,7 @@ + List toRemove = new LinkedList<>(); this.world.a(entityslice.stream().filter((entity) -> { -+ if (!CraftEventFactory.doEntityAddEventCalling(this.world, entity, CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { ++ if (this.needsDecoration && !CraftEventFactory.doEntityAddEventCalling(this.world, entity, CreatureSpawnEvent.SpawnReason.CHUNK_GEN)) { // Only call for new chunks + toRemove.add(entity); + return false; + }