Class LivingSpawnEvent

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

public class LivingSpawnEvent extends LivingEvent
Base class for mob spawn events. Will not be fired directly.
See Also:
  • Field Details

    • level

      private final LevelAccessor level
    • mob

      private final Mob mob
    • x

      private final double x
    • y

      private final double y
    • z

      private final double z
  • Constructor Details

    • LivingSpawnEvent

      public LivingSpawnEvent(Mob mob, LevelAccessor level, double x, double y, double z)
  • Method Details

    • getEntity

      public Mob getEntity()
      Returns the mob that is causing a spawn action.
      Overrides:
      getEntity in class LivingEvent
      Returns:
      the mob that is causing a spawn action
    • getLevel

      public LevelAccessor getLevel()
      Returns the level relating to the mob spawn action.
      Returns:
      the level relating to the mob spawn action
    • getX

      public double getX()
      Returns the x-coordinate relating to the mob spawn action.
      Returns:
      the x-coordinate relating to the mob spawn action
    • getY

      public double getY()
      Returns the y-coordinate relating to the mob spawn action.
      Returns:
      the y-coordinate relating to the mob spawn action
    • getZ

      public double getZ()
      Returns the z-coordinate relating to the mob spawn action.
      Returns:
      the z-coordinate relating to the mob spawn action