Class EnterPortalEvent

java.lang.Object
com.hypixel.hytale.component.system.EcsEvent
com.hypixel.hytale.builtin.portals.events.EnterPortalEvent

public class EnterPortalEvent extends EcsEvent
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 Details

  • Method Details

    • getContext

      @Nonnull public InteractionContext getContext()
      The interaction context associated with the event.
      Returns:
      the interaction context of the event
    • getEntityRef

      @Nonnull public Ref<EntityStore> getEntityRef()
      The entity that triggered the interaction with the portal.
      Returns:
      the interaction entity.
    • getPortalRef

      @Nonnull public Ref<ChunkStore> getPortalRef()
      The portal block entity ref.
      Returns:
      the portal block entity ref.
    • getPortalDevice

      @Nonnull public PortalDevice getPortalDevice()
      The PortalDevice component 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

      public String toString()
      Overrides:
      toString in class Object