Interface InteractionCondition
- All Known Implementing Classes:
AlwaysFalseInteractionCondition
,AlwaysTrueInteractionCondition
,BlockIsOneOfInteractionCondition
,BuildableInteractionCondition
,CanBattleInteractionCondition
,ContainsItemInteractionCondition
,CooldownInteractionCondition
,EqualInteractionCondition
,GreaterThanInteractionCondition
,GreaterThanOrEqualInteractionCondition
,ImmutableInteractionCondition
,InRangeExclusiveInteractionCondition
,InRangeInclusiveInteractionCondition
,ItemIsOneOfInteractionCondition
,ItemsEqualInteractionCondition
,ItemsTagsMatchInteractionCondition
,LessThanInteractionCondition
,LessThanOrEqualInteractionCondition
,LogicalANDInteractionCondition
,LogicalNANDInteractionCondition
,LogicalNORInteractionCondition
,LogicalNOTInteractionCondition
,LogicalORInteractionCondition
,LogicalXNORInteractionCondition
,LogicalXORInteractionCondition
,MonthIsInteractionCondition
,MutableInteractionCondition
,NotEqualInteractionCondition
,NumberListContainsInteractionCondition
,RandomChanceInteractionCondition
,RecipeMatchesInteractionCondition
,SpecMatchesEntityInteractionCondition
,SpecMatchesInteractionCondition
,StringCompareCaseInsensitiveInteractionCondition
,StringCompareInteractionCondition
,StringContainsInteractionCondition
,StringListContainsInteractionCondition
,StructureIsOneOfInteractionCondition
public interface InteractionCondition
This checks that the event fired, with the
given context, is relevant to the interaction
that the logic is flowing through.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<InteractionCondition>
static final com.mojang.serialization.Codec<InteractionCondition>
-
Method Summary
Modifier and TypeMethodDescriptionstatic InteractionCondition
always()
Returns an interaction condition that always returns truebuilder()
Creates a builder for an interaction conditioncom.mojang.serialization.Codec<? extends InteractionCondition>
codec()
Codec for decoding data about the interaction conditiondefault InteractionCondition
fill
(ConditionData data) Fills the condition with the given databoolean
fits
(InteractionContext context) Method to check if the given context is correct for the conditionstatic InteractionCondition
from
(ConditionData data) Converts the network data into an interaction conditionReturns the input types for the conditionstatic InteractionCondition
never()
Returns an interaction condition that always returns falsedefault ConditionData
toData()
Returns the sanitized data for the condition
-
Field Details
-
DIRECT_CODEC
-
CODEC
-
-
Method Details
-
codec
com.mojang.serialization.Codec<? extends InteractionCondition> codec()Codec for decoding data about the interaction condition- Returns:
- The codec
-
fits
Method to check if the given context is correct for the condition- Parameters:
context
- The context- Returns:
- True if the logic can proceed with the given context
-
inputTypes
Returns the input types for the condition- Returns:
- The input types
-
fill
Fills the condition with the given data- Parameters:
data
- The data- Returns:
- The filled condition
-
toData
Returns the sanitized data for the condition- Returns:
- The data
-
from
Converts the network data into an interaction condition- Parameters:
data
- The network data- Returns:
- The interaction condition
-
always
Returns an interaction condition that always returns true- Returns:
- The interaction condition
-
never
Returns an interaction condition that always returns false- Returns:
- The interaction condition
-
builder
Creates a builder for an interaction condition- Returns:
- The builder
-