mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 06:32:17 -07:00
SPIGOT-4534: Only call event for new chunks
This commit is contained in:
@@ -149,7 +149,7 @@
|
||||
|
||||
+ List<Entity> 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;
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user