InteractionSimulationHandler
Package: com.hypixel.hytale.server.core.modules.interaction
public class InteractionSimulationHandler implements IInteractionSimulationHandlerDefault implementation of IInteractionSimulationHandler used for NPC/server-side interaction simulation. Tracks a simple boolean pressed state per InteractionType. Charging is considered active as long as the corresponding button is held down, and the charge value equals elapsed time.
Instance Methods
Section titled “Instance Methods”@Overridepublic void setState(@Nonnull InteractionType type, boolean state)Sets the pressed state for the given interaction type.
@Overridepublic boolean isCharging(boolean firstRun, float time, @Nonnull InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler)Returns true if the interaction type’s button is currently held down.
@Overridepublic boolean shouldCancelCharging(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler)Always returns false — simulation handlers never cancel charging.
@Overridepublic float getChargeValue(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler)Returns the elapsed time as the charge value.
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.