mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 19:25:49 -07:00
Added SpawnReasons for nether portals and dispensers. Fixes BUKKIT-3148
Previously any entities spawned through dispensers (monster eggs) or by nether portals were given the incorrect SpawnReason of SPAWNER_EGG. This made it impossible to distinguish what exactly happened in regards to the creature being spawned. With the additional two SpawnReasons, plugins can identify sources of creature spawning more easily and accuratly. By: Kodekpl <Kodekgames@gmail.com>
This commit is contained in:
@@ -154,6 +154,14 @@ public class CreatureSpawnEvent extends EntityEvent implements Cancellable {
|
||||
* When an entity calls for reinforcements
|
||||
*/
|
||||
REINFORCEMENTS,
|
||||
/**
|
||||
* When a creature is spawned by nether portal
|
||||
*/
|
||||
NETHER_PORTAL,
|
||||
/**
|
||||
* When a creature is spawned by a dispenser dispensing an egg
|
||||
*/
|
||||
DISPENSE_EGG,
|
||||
/**
|
||||
* When a creature is spawned by plugins
|
||||
*/
|
||||
|
Reference in New Issue
Block a user