Class EntityTeleportEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.entity.EntityEvent
net.minecraftforge.event.entity.EntityTeleportEvent
Direct Known Subclasses:
EntityTeleportEvent.ChorusFruit, EntityTeleportEvent.EnderEntity, EntityTeleportEvent.EnderPearl, EntityTeleportEvent.SpreadPlayersCommand, EntityTeleportEvent.TeleportCommand

public class EntityTeleportEvent extends EntityEvent
EntityTeleportEvent is fired when an event involving any teleportation of an Entity occurs.
If a method utilizes this Event as its parameter, the method will receive every child event of this class.

getTarget() contains the target destination.
getPrev() contains the entity's current position.

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

    • targetX

      protected double targetX
    • targetY

      protected double targetY
    • targetZ

      protected double targetZ
  • Constructor Details

    • EntityTeleportEvent

      public EntityTeleportEvent(Entity entity, double targetX, double targetY, double targetZ)
  • Method Details

    • getTargetX

      public double getTargetX()
    • setTargetX

      public void setTargetX(double targetX)
    • getTargetY

      public double getTargetY()
    • setTargetY

      public void setTargetY(double targetY)
    • getTargetZ

      public double getTargetZ()
    • setTargetZ

      public void setTargetZ(double targetZ)
    • getTarget

      public Vec3 getTarget()
    • getPrevX

      public double getPrevX()
    • getPrevY

      public double getPrevY()
    • getPrevZ

      public double getPrevZ()
    • getPrev

      public Vec3 getPrev()