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, Level, 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

      public SpecialSpawn(Mob entity, Level world, double x, double y, double z, @Nullable BaseSpawner spawner, MobSpawnType spawnReason)
      Parameters:
      spawner - the position of a tileentity or approximate position of an entity that initiated the spawn if any
  • Method Details