Package net.minecraftforge.event.entity
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
EntityTeleportEvent is fired when an event involving any teleportation of an Entity occurs.
If a method utilizes this
All children of this event are fired on the
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
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
EntityTeleportEvent.ChorusFruit is fired before a LivingEntity is teleported due to consuming Chorus Fruit.static class
EntityTeleportEvent.EnderEntity is fired before an Enderman or Shulker randomly teleports.static class
EntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.static class
EntityTeleportEvent.SpreadPlayersCommand is fired before a living entity is teleported from use ofSpreadPlayersCommand
.static class
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.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
-
Constructor Summary
ConstructorDescriptionEntityTeleportEvent
(Entity entity, double targetX, double targetY, double targetZ) -
Method Summary
Modifier and TypeMethodDescriptiongetPrev()
double
getPrevX()
double
getPrevY()
double
getPrevZ()
double
double
double
void
setTargetX
(double targetX) void
setTargetY
(double targetY) void
setTargetZ
(double targetZ) Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
-
Field Details
-
targetX
protected double targetX -
targetY
protected double targetY -
targetZ
protected double targetZ
-
-
Constructor Details
-
EntityTeleportEvent
-
-
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
-
getPrevX
public double getPrevX() -
getPrevY
public double getPrevY() -
getPrevZ
public double getPrevZ() -
getPrev
-