Contents
Class EnterPortalEvent
java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.builtin.portals.events.EnterPortalEvent
An event triggered when an entity enters a portal. This event provides contextual information
about the interaction that triggered the event and the portal that was activated.
The event is fired on the ChunkStore using the portal block entity as the Ref.
The entity that triggered the interaction can be accessed via getEntityRef();
-
Constructor Summary
ConstructorsConstructorDescriptionEnterPortalEvent(InteractionContext context, org.joml.Vector3i portalBlock, Ref<ChunkStore> portalRef, PortalDevice portalDevice) -
Method Summary
Modifier and TypeMethodDescriptionThe interaction context associated with the event.The entity that triggered the interaction with the portal.org.joml.Vector3icThe position of the portal block entity.ThePortalDevicecomponent value.The portal block entity ref.toString()
-
Constructor Details
-
EnterPortalEvent
public EnterPortalEvent(@Nonnull InteractionContext context, @Nonnull org.joml.Vector3i portalBlock, @Nonnull Ref<ChunkStore> portalRef, @Nonnull PortalDevice portalDevice)
-
-
Method Details
-
getContext
The interaction context associated with the event.- Returns:
- the interaction context of the event
-
getEntityRef
The entity that triggered the interaction with the portal.- Returns:
- the interaction entity.
-
getPortalRef
The portal block entity ref.- Returns:
- the portal block entity ref.
-
getPortalDevice
ThePortalDevicecomponent value.- Returns:
- the
PortalDevice.
-
getPortalBlock
@Nonnull public org.joml.Vector3ic getPortalBlock()The position of the portal block entity.- Returns:
- the portal's block position.
-
toString
-