Class EntityTeleportEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.living.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 thisEventas 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 theMinecraftForge.EVENT_BUS.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEntityTeleportEvent.ChorusFruitEntityTeleportEvent.ChorusFruit is fired before a LivingEntity is teleported due to consuming Chorus Fruit.static classEntityTeleportEvent.EnderEntityEntityTeleportEvent.EnderEntity is fired before an Enderman or Shulker randomly teleports.static classEntityTeleportEvent.EnderPearlEntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.static classEntityTeleportEvent.SpreadPlayersCommandEntityTeleportEvent.SpreadPlayersCommand is fired before a living entity is teleported from use ofSpreadPlayersCommand.static classEntityTeleportEvent.TeleportCommandEntityTeleportEvent.TeleportCommand is fired before a living entity is teleported from use ofTeleportCommand.-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Constructor Description EntityTeleportEvent(Entity entity, double targetX, double targetY, double targetZ)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vector3dgetPrev()doublegetPrevX()doublegetPrevY()doublegetPrevZ()Vector3dgetTarget()doublegetTargetX()doublegetTargetY()doublegetTargetZ()voidsetTargetX(double targetX)voidsetTargetY(double targetY)voidsetTargetZ(double targetZ)-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-
-
-
Constructor Detail
-
EntityTeleportEvent
public EntityTeleportEvent(Entity entity, double targetX, double targetY, double targetZ)
-
-
Method Detail
-
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 Vector3d getTarget()
-
getPrevX
public double getPrevX()
-
getPrevY
public double getPrevY()
-
getPrevZ
public double getPrevZ()
-
getPrev
public Vector3d getPrev()
-
-