From bd15f6a4bc81a9733160a3f24166c8debac1dce3 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 27 Apr 2019 10:08:39 +1000 Subject: [PATCH] Deprecate CHUNK_GEN spawn reason By: md_5 --- .../java/org/bukkit/event/entity/CreatureSpawnEvent.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java b/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java index 3c48c2a3d..161ea7f5d 100644 --- a/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/entity/CreatureSpawnEvent.java @@ -1,6 +1,8 @@ package org.bukkit.event.entity; +import org.bukkit.Chunk; import org.bukkit.entity.LivingEntity; +import org.bukkit.event.world.ChunkLoadEvent; import org.jetbrains.annotations.NotNull; /** @@ -49,7 +51,13 @@ public class CreatureSpawnEvent extends EntitySpawnEvent { JOCKEY, /** * When a creature spawns due to chunk generation + * + * @deprecated no longer called, chunks are generated with entities + * already existing. Consider using {@link ChunkLoadEvent}, + * {@link ChunkLoadEvent#isNewChunk()} and {@link Chunk#getEntities()} + * for similar effect. */ + @Deprecated CHUNK_GEN, /** * When a creature spawns from a spawner