Class LivingSpawnEvent.SpecialSpawn

java.lang.Object
net.minecraftforge.eventbus.api.Event
Enclosing class:
LivingSpawnEvent

public static class LivingSpawnEvent.SpecialSpawn extends LivingSpawnEvent
SpecialSpawn is fired when an Entity is to be spawned.
This allows you to do special inializers in the new entity.

This event is fired via the ForgeEventFactory.doSpecialSpawn(Mob, LevelAccessor, float, float, float, BaseSpawner, MobSpawnType).

This event is Cancelable.
If this event is canceled, the Entity is not spawned.

This event does not have a result. Event.HasResult

This event is fired on the MinecraftForge.EVENT_BUS.
  • Field Details

  • Constructor Details

    • SpecialSpawn

      @Deprecated(forRemoval=true, since="1.18.1") public SpecialSpawn(Mob entity, Level world, double x, double y, double z, @Nullable BaseSpawner spawner, MobSpawnType spawnReason)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameters:
      spawner - the position of a tileentity or approximate position of an entity that initiated the spawn if any
    • SpecialSpawn

      public SpecialSpawn(Mob entity, LevelAccessor world, double x, double y, double z, @Nullable BaseSpawner spawner, MobSpawnType spawnReason)
  • Method Details