[SPIGOT-4534] CreatureSpawnEvent's with SpawnReason CHUNK_GEN are no longer occurring. Created: 16/Dec/18 Updated: 17/Dec/18 Resolved: 17/Dec/18 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Jesse Prescott | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 1 |
Labels: | None |
Issue Links: |
|
||||||||
Version: | This server is running CraftBukkit version git-Spigot-140f654-b446cb5 (MC: 1.13.2) (Implementing API version 1.13.2-R0.1-SNAPSHOT) | ||||||||
Guidelines Read: | Yes |
Description |
CreatureSpawnEvent's used to have the SpawnReason as "CHUNK_GEN" if the creature being spawned was due to first-time chunk generation. Now, no creatures fire the event with "CHUNK_GEN" at all.
Recreating: 1) Fresh Spigot/CraftBukkit install with no other plugins. 2) Create a basic plugin with the following event registered to the PluginManager: @EventHandler(priority = EventPriority.MONITOR)
public void onCreatureSpawnEvent(CreatureSpawnEvent event) {
Bukkit.broadcastMessage(event.getSpawnReason().name());
}
3) Confirm that you are receiving spawn reasons such as "NATURAL" in the chat. 4) Observe that as you load new chunks in a new world, the spawn reason "CHUNK_GEN" is missing. |
Comments |
Comment by md_5 [ 17/Dec/18 ] |
Should be resolved now. |
Comment by Jesse Prescott [ 17/Dec/18 ] |
Just to confirm, the fix seems to call CHUNK_GEN anytime a creature is spawned due to a chunk loading? Previous behaviour was that CHUNK_GEN is called once and only once when a chunk is generated for the first time; subsequent creature spawns due to chunk loading were using NATURAL. Is that going to be new behaviour? If so, it might be an idea to update the javadoc for SpawnReason to make this clear. |
Comment by md_5 [ 16/Dec/18 ] |
Because generatoraccess is not world It'll be fixed soon |
Comment by Jesse Prescott [ 16/Dec/18 ] |
So how come the previous patches no longer work? |
Comment by Jesse Prescott [ 16/Dec/18 ] |
Can confirm CraftBukkit 1.12.2 does fire CHUNK_GEN events. |
Comment by Jesse Prescott [ 16/Dec/18 ] |
I'm just testing previous versions of CraftBukkit to confirm the bug was introduced in 1.13 onwards and i'll get back to you. Interesting, so was the world gen not isolated from the rest of the server from 1.12.2 and below? |
Comment by md_5 [ 16/Dec/18 ] |
Presumably since 1.13 The problem is chunk gen is isolated from the rest of the server. |
Comment by Jesse Prescott [ 16/Dec/18 ] |
Possibly related to: https://hub.spigotmc.org/jira/browse/SPIGOT-4533 |