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 thisEvent
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 theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EntityTeleportEvent.ChorusFruit
EntityTeleportEvent.ChorusFruit is fired before a LivingEntity is teleported due to consuming Chorus Fruit.static class
EntityTeleportEvent.EnderEntity
EntityTeleportEvent.EnderEntity is fired before an Enderman or Shulker randomly teleports.static class
EntityTeleportEvent.EnderPearl
EntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.static class
EntityTeleportEvent.SpreadPlayersCommand
EntityTeleportEvent.SpreadPlayersCommand is fired before a living entity is teleported from use ofSpreadPlayersCommand
.static class
EntityTeleportEvent.TeleportCommand
EntityTeleportEvent.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 Vector3d
getPrev()
double
getPrevX()
double
getPrevY()
double
getPrevZ()
Vector3d
getTarget()
double
getTargetX()
double
getTargetY()
double
getTargetZ()
void
setTargetX(double targetX)
void
setTargetY(double targetY)
void
setTargetZ(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()
-
-