Contents
- Description
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- setState(InteractionType, boolean)
- isCharging(boolean, float, InteractionType, InteractionContext, Ref, CooldownHandler)
- shouldCancelCharging(boolean, float, InteractionType, InteractionContext, Ref, CooldownHandler)
- getChargeValue(boolean, float, InteractionType, InteractionContext, Ref, CooldownHandler)
- requestChargeTime(float)
Class NPCInteractionSimulationHandler
java.lang.Object
com.hypixel.hytale.server.npc.interactions.NPCInteractionSimulationHandler
- All Implemented Interfaces:
IInteractionSimulationHandler
public class NPCInteractionSimulationHandler
extends Object
implements IInteractionSimulationHandler
Created on 22/05/2020
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatgetChargeValue(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler) booleanisCharging(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler) voidrequestChargeTime(float chargeTime) voidsetState(InteractionType type, boolean state) booleanshouldCancelCharging(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler)
-
Constructor Details
-
NPCInteractionSimulationHandler
public NPCInteractionSimulationHandler()
-
-
Method Details
-
setState
- Specified by:
setStatein interfaceIInteractionSimulationHandler
-
isCharging
public boolean isCharging(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler) - Specified by:
isChargingin interfaceIInteractionSimulationHandler
-
shouldCancelCharging
public boolean shouldCancelCharging(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler) - Specified by:
shouldCancelChargingin interfaceIInteractionSimulationHandler- Returns:
- Returns
trueif charging should be canceled. On the client side this is handled when any other button (except the current "type") is pressed down.
-
getChargeValue
public float getChargeValue(boolean firstRun, float time, InteractionType type, InteractionContext context, Ref<EntityStore> ref, CooldownHandler cooldownHandler) - Specified by:
getChargeValuein interfaceIInteractionSimulationHandler
-
requestChargeTime
public void requestChargeTime(float chargeTime)
-