Class InteractionHost

java.lang.Object
com.hypixel.hytale.server.core.modules.interaction.host.InteractionHost
All Implemented Interfaces:
Component<EntityStore>, Cloneable

public class InteractionHost extends Object implements Component<EntityStore>
Marks a transient "interaction host" entity that runs a detached interaction chain at a chosen pose. Holds the running InteractionChain so the InteractionHostCleanupSystem can remove the host once the chain finishes.
  • Constructor Details

    • InteractionHost

      public InteractionHost()
  • Method Details

    • getComponentType

      @Nonnull public static ComponentType<EntityStore, InteractionHost> getComponentType()
    • spawnHost

      @Nullable public static Ref<EntityStore> spawnHost(@Nonnull Store<EntityStore> store, @Nonnull org.joml.Vector3d position, @Nonnull Rotation3f rotation, float ttlSeconds, @Nonnull IInteractionSimulationHandler simulationHandler)
      Spawns a host entity at the given pose using the supplied simulation handler. Returns the new entity reference, or null if the entity could not be added.
      Parameters:
      store - the entity store to add the host to.
      position - the world position of the host.
      rotation - the host's orientation (stamped on both transform and head rotation).
      ttlSeconds - the despawn-backstop lifetime in seconds.
      simulationHandler - the self-simulation handler for the host's clientless interaction manager.
    • getChain

      @Nullable public InteractionChain getChain()
    • setChain

      public void setChain(@Nullable InteractionChain chain)
    • clone

      @Nonnull public Component<EntityStore> clone()
      Specified by:
      clone in interface Component<EntityStore>
      Returns:
      a clone instance of the original component instance.