Contents
Class InteractionHost
java.lang.Object
com.hypixel.hytale.server.core.modules.interaction.host.InteractionHost
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
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.-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()getChain()static ComponentType<EntityStore, InteractionHost> voidsetChain(InteractionChain chain) static Ref<EntityStore> spawnHost(Store<EntityStore> store, org.joml.Vector3d position, Rotation3f rotation, float ttlSeconds, IInteractionSimulationHandler simulationHandler) Spawns a host entity at the given pose using the supplied simulation handler.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
InteractionHost
public InteractionHost()
-
-
Method Details
-
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, ornullif 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
-
setChain
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-