Contents
Class LogicCondition
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.condition.Condition
com.hypixel.hytale.server.core.modules.entity.condition.LogicCondition
A condition that combines multiple conditions using a logical operator.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe logical operators for combining conditions. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BuilderCodec<LogicCondition> The codec used to parseLogicConditioninstances. -
Constructor Summary
ConstructorsConstructorDescriptionLogicCondition(boolean inverse, LogicCondition.Operator operator, Condition[] conditions) Default Constructor for aLogicConditioninstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleaneval0(ComponentAccessor<EntityStore> componentAccessor, Ref<EntityStore> ref, Instant currentTime) The internal evaluation method for the condition.toString()Methods inherited from class Condition
allConditionsMet, allConditionsMet, eval
-
Field Details
-
CODEC
The codec used to parseLogicConditioninstances.
-
-
Constructor Details
-
LogicCondition
public LogicCondition(boolean inverse, @Nonnull LogicCondition.Operator operator, @Nonnull Condition[] conditions) Default Constructor for aLogicConditioninstance.- Parameters:
inverse- Whether to invert the condition's result.operator- The logical operator to combine the conditions.conditions- The array of conditions to be evaluated.
-
-
Method Details
-
eval0
public boolean eval0(@Nonnull ComponentAccessor<EntityStore> componentAccessor, @Nonnull Ref<EntityStore> ref, @Nonnull Instant currentTime) Description copied from class:ConditionThe internal evaluation method for the condition.- Specified by:
eval0in classCondition- Parameters:
componentAccessor- TheComponentAccessor<EntityStore>for store access.ref- The entity reference of the entity.currentTime- The current world time.- Returns:
trueif the condition is met,falseotherwise.
-
toString
-