Paper
Paper copied to clipboard
Implement CreatureSpawnEvent.SpawnReason.SPAWNER_BUCKET
This close #8234 adding a new SpawnReason for entity spawned using a bucket.
The name of the reason is based in another things with "spawn" logic like SPAWNER_EGG
I think just BUCKET or ENTITY_BUCKET would be better than SPAWNER_BUCKET.
The only other two entries with "spawn" in their name are actually named like that in game. E.g. the Spawner Block or for example "Blaze Spawn Egg"
See https://github.com/PaperMC/Paper/issues/4361#issuecomment-701640428. In a similar situations, we don't change a Bee's SpawnReason when they leave a beehive, it keeps the previous one. A similar thing should be applied here. It can fallback to some other reason if it doesn't exist. (I think spawn egg is still fine for that)