From bb6f384a830548def9c73264dab1a4d06fc2bdf4 Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 17 Dec 2018 21:36:21 +1100 Subject: [PATCH] SPIGOT-4534: Only call event for new chunks --- nms-patches/Chunk.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nms-patches/Chunk.patch b/nms-patches/Chunk.patch index bec33360b1..f7b4aa9eb3 100644 --- a/nms-patches/Chunk.patch +++ b/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; + }