Uses of Class
net.minecraft.world.level.BaseSpawner
Package
Description
-
Uses of BaseSpawner in net.minecraft.world.entity.vehicle
-
Uses of BaseSpawner in net.minecraft.world.level.block.entity
-
Uses of BaseSpawner in net.neoforged.neoforge.event
Modifier and TypeMethodDescriptionstatic boolean
EventHooks.checkSpawnPositionSpawner
(Mob mob, ServerLevelAccessor level, MobSpawnType spawnType, SpawnData spawnData, BaseSpawner spawner) Specialized variant ofEventHooks.checkSpawnPosition(net.minecraft.world.entity.Mob, net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.entity.MobSpawnType)
for spawners, as they have slightly different checks.static MobSpawnEvent.FinalizeSpawn
EventHooks.onFinalizeSpawnSpawner
(Mob mob, ServerLevelAccessor level, DifficultyInstance difficulty, @Nullable SpawnGroupData spawnData, @Nullable CompoundTag spawnTag, BaseSpawner spawner) Returns the FinalizeSpawn event instance, or null if it was canceled.
This is separate since mob spawners perform special finalizeSpawn handling when NBT data is present, but we still want to fire the event.
This overload is also the only way to pass through aBaseSpawner
instance. -
Uses of BaseSpawner in net.neoforged.neoforge.event.entity.living
Modifier and TypeFieldDescriptionprivate final @Nullable BaseSpawner
MobSpawnEvent.FinalizeSpawn.spawner
private final @Nullable BaseSpawner
MobSpawnEvent.PositionCheck.spawner
Modifier and TypeMethodDescription@Nullable BaseSpawner
MobSpawnEvent.FinalizeSpawn.getSpawner()
Retrieves the underlyingBaseSpawner
instance if this mob was created by a Mob Spawner of some form.@Nullable BaseSpawner
MobSpawnEvent.PositionCheck.getSpawner()
Retrieves the underlyingBaseSpawner
instance if this mob was created by a Mob Spawner of some form.ModifierConstructorDescriptionFinalizeSpawn
(Mob entity, ServerLevelAccessor level, double x, double y, double z, DifficultyInstance difficulty, MobSpawnType spawnType, @Nullable SpawnGroupData spawnData, @Nullable CompoundTag spawnTag, @Nullable BaseSpawner spawner) PositionCheck
(Mob mob, ServerLevelAccessor level, MobSpawnType spawnType, @Nullable BaseSpawner spawner)