Class LivingSpawnEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
Direct Known Subclasses:
LivingSpawnEvent.AllowDespawn, LivingSpawnEvent.CheckSpawn, LivingSpawnEvent.SpecialSpawn

public class LivingSpawnEvent extends LivingEvent
LivingSpawnEvent is fired for any events associated with Living Entities spawn status.
If a method utilizes this event as its parameter, the method will receive every child event of this class.

world contains the world in which this living Entity is being spawned.
x contains the x-coordinate this entity is being spawned at.
y contains the y-coordinate this entity is being spawned at.
z contains the z-coordinate this entity is being spawned at.

All children of this event are fired on the MinecraftForge.EVENT_BUS.
  • Field Details

    • world

      private final LevelAccessor world
    • x

      private final double x
    • y

      private final double y
    • z

      private final double z
  • Constructor Details

    • LivingSpawnEvent

      public LivingSpawnEvent(Mob entity, LevelAccessor world, double x, double y, double z)
  • Method Details

    • getWorld

      public LevelAccessor getWorld()
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()