Class LevelEvent.PotentialSpawns

java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.level.LevelEvent
net.neoforged.neoforge.event.level.LevelEvent.PotentialSpawns
All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
Enclosing class:
LevelEvent

public static class LevelEvent.PotentialSpawns extends LevelEvent implements net.neoforged.bus.api.ICancellableEvent
Fired when building a list of all possible entities that can spawn at the specified location.

If an entry is added to the list, it needs to be a globally unique instance.

The event is called in
invalid reference
net.minecraft.world.level.NaturalSpawner#mobsAt(ServerLevel, StructureManager, ChunkGenerator, MobCategory, RandomSource, BlockPos)
.

This event is cancellable, and does not

invalid reference
have a result
. Canceling the event will result in an empty list, meaning no entity will be spawned.