Uses of Class
net.minecraftforge.event.entity.living.MobSpawnEvent
-
Uses of MobSpawnEvent in net.minecraftforge.event.entity.living
Modifier and TypeClassDescriptionstatic class
This event is fired fromMob.checkDespawn()
.
It fires once per tick per mob that is attempting to despawn.
It is not fired if the mob is persistent (meaning it may not despawn).static class
This event is fired beforeMob.finalizeSpawn(net.minecraft.world.level.ServerLevelAccessor, net.minecraft.world.DifficultyInstance, net.minecraft.world.entity.MobSpawnType, net.minecraft.world.entity.SpawnGroupData, net.minecraft.nbt.CompoundTag)
is called.
This allows mods to control mob initialization.
In vanilla code, this event is injected by a transformer and not via patch, so calls cannot be traced via call hierarchy (it is not source-visible).