Class EntityTeleportEvent.EnderPearl
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.entity.EntityEvent
net.neoforged.neoforge.event.entity.EntityTeleportEvent
net.neoforged.neoforge.event.entity.EntityTeleportEvent.EnderPearl
- All Implemented Interfaces:
net.neoforged.bus.api.ICancellableEvent
- Enclosing class:
EntityTeleportEvent
public static class EntityTeleportEvent.EnderPearl
extends EntityTeleportEvent
implements net.neoforged.bus.api.ICancellableEvent
EntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.
This event is
If the event is not canceled, the entity will be teleported.
This event does not have a result.
This event is fired on the
This event is only fired on the
If this event is canceled, the entity will not be teleported.
This event is
ICancellableEvent
.If the event is not canceled, the entity will be teleported.
This event does not have a result.
Event.HasResult
This event is fired on the
NeoForge.EVENT_BUS
.This event is only fired on the
LogicalSide.SERVER
side.If this event is canceled, the entity will not be teleported.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityTeleportEvent
EntityTeleportEvent.ChorusFruit, EntityTeleportEvent.EnderEntity, EntityTeleportEvent.EnderPearl, EntityTeleportEvent.SpreadPlayersCommand, EntityTeleportEvent.TeleportCommand
Nested classes/interfaces inherited from class net.neoforged.neoforge.event.entity.EntityEvent
EntityEvent.EnteringSection, EntityEvent.EntityConstructing, EntityEvent.Size
Nested classes/interfaces inherited from class net.neoforged.bus.api.Event
net.neoforged.bus.api.Event.HasResult, net.neoforged.bus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate float
private final HitResult
private final ThrownEnderpearl
private final ServerPlayer
Fields inherited from class net.neoforged.neoforge.event.entity.EntityTeleportEvent
targetX, targetY, targetZ
-
Constructor Summary
ConstructorDescriptionEnderPearl
(ServerPlayer entity, double targetX, double targetY, double targetZ, ThrownEnderpearl pearlEntity, float attackDamage, HitResult hitResult) -
Method Summary
Modifier and TypeMethodDescriptionfloat
@Nullable HitResult
void
setAttackDamage
(float attackDamage) Methods inherited from class net.neoforged.neoforge.event.entity.EntityTeleportEvent
getPrev, getPrevX, getPrevY, getPrevZ, getTarget, getTargetX, getTargetY, getTargetZ, setTargetX, setTargetY, setTargetZ
Methods inherited from class net.neoforged.neoforge.event.entity.EntityEvent
getEntity
Methods inherited from class net.neoforged.bus.api.Event
getResult, hasResult, setResult
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.bus.api.ICancellableEvent
isCanceled, setCanceled
-
Field Details
-
player
-
pearlEntity
-
attackDamage
private float attackDamage -
hitResult
-
-
Constructor Details
-
EnderPearl
@Internal public EnderPearl(ServerPlayer entity, double targetX, double targetY, double targetZ, ThrownEnderpearl pearlEntity, float attackDamage, HitResult hitResult)
-
-
Method Details
-
getPearlEntity
-
getPlayer
-
getHitResult
-
getAttackDamage
public float getAttackDamage() -
setAttackDamage
public void setAttackDamage(float attackDamage)
-