Class OperatorBuilders
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.OperatorBuilders
Collection of operator builders.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionstatic final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder
static final OperatorBuilder
static final OperatorBuilder
static final IOperatorValuePropagator<OperatorBase.SafeVariablesGetter,
Optional<net.minecraft.world.level.block.SoundType>> static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final IterativeFunction.PrePostBuilder<net.minecraftforge.energy.IEnergyStorage,
Boolean> static final IterativeFunction.PrePostBuilder<net.minecraftforge.energy.IEnergyStorage,
Integer> static final IterativeFunction.PrePostBuilder<net.minecraftforge.energy.IEnergyStorage,
IValue> static final IterativeFunction.PrePostBuilder<net.minecraft.world.entity.Entity,
IValue> static final IterativeFunction.PrePostBuilder<net.minecraft.world.entity.Entity,
Boolean> static final IterativeFunction.PrePostBuilder<net.minecraft.world.entity.Entity,
Double> static final IterativeFunction.PrePostBuilder<net.minecraftforge.fluids.FluidStack,
IValue> static final IterativeFunction.PrePostBuilder<net.minecraftforge.fluids.FluidStack,
Boolean> static final IterativeFunction.PrePostBuilder<net.minecraftforge.fluids.FluidStack,
Integer> static final IterativeFunction.PrePostBuilder<net.minecraft.world.item.ItemStack,
IValue> static final IterativeFunction.PrePostBuilder<net.minecraft.world.item.ItemStack,
Boolean> static final IterativeFunction.PrePostBuilder<net.minecraft.world.item.ItemStack,
Integer> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
IValue> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.CompoundTag>,
IValue> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
IValue> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Boolean> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Double> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Integer> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Long> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Optional<net.minecraft.nbt.Tag>> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
String> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.CompoundTag>,
Boolean> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.CompoundTag>,
Integer> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Triple<Optional<net.minecraft.nbt.CompoundTag>,
String, OperatorBase.SafeVariablesGetter>, IValue> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Triple<Optional<net.minecraft.nbt.CompoundTag>,
String, OperatorBase.SafeVariablesGetter>, Optional<net.minecraft.nbt.CompoundTag>> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Boolean> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Double> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Integer> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Long> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
Optional<net.minecraft.nbt.Tag>> static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,
String> static final IterativeFunction.PrePostBuilder<IOperator,
IValue> static final IterativeFunction.PrePostBuilder<IOperator,
IValue> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,
OperatorBase.SafeVariablesGetter>, IValue> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,
OperatorBase.SafeVariablesGetter>, IValue> static final IterativeFunction.PrePostBuilder<net.minecraft.resources.ResourceLocation,
IValue> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Triple<IOperator,
IOperator, IOperator>, IValue> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,
IOperator>, IValue> static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,
IOperator>, IValue> static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
Corresponds toValueHelpers.evaluateOperator(IOperator, IVariable[])
.Corresponds toValueHelpers.evaluateOperator(IOperator, IVariable[])
, but with the input variable being a list.static final IOperatorValuePropagator<Boolean,
IValue> static final IOperatorValuePropagator<Double,
IValue> static final IOperatorValuePropagator<Integer,
IValue> static final IOperatorValuePropagator<Long,
IValue> static final IOperatorValuePropagator<Optional<net.minecraft.nbt.Tag>,
Optional<net.minecraft.nbt.CompoundTag>> static final IOperatorValuePropagator<Optional<net.minecraft.nbt.CompoundTag>,
IValue> static final IOperatorValuePropagator<Optional<net.minecraft.nbt.Tag>,
IValue> static final IOperatorValuePropagator<net.minecraft.resources.ResourceLocation,
ValueTypeString.ValueString> static final IOperatorValuePropagator<String,
IValue> static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
static final OperatorBuilder<OperatorBase.SafeVariablesGetter>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OperatorBase.IFunction
createFunctionIngredientsList
(Callable<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>> componentReference) createOperatorTypeValidator
(IValueType<?>... expectedSubTypes) Create a type validator for operator operator type validators.static <T> IterativeFunction.PrePostBuilder<T,
IValue> getItemCapability
(OperatorBuilders.ICapabilityReference<T> capabilityReference) Helper function to create an operator function builder for deriving capabilities from an itemstack.static IOperator
getSafeOperator
(ValueTypeOperator.ValueOperator value, IValueType expectedOutput) Get the operator from a value in a safe manner.static IOperator
Get the predicate from a value in a safe manner.static <VT extends IValueType<V>,
V extends IValue, T, M>
List<T>unwrapIngredientComponentList
(org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> component, ValueTypeList.ValueList<VT, V> list)
-
Field Details
-
LOGICAL
-
LOGICAL_1_PREFIX
-
LOGICAL_2
-
PROPAGATOR_INTEGER_VALUE
-
PROPAGATOR_LONG_VALUE
-
PROPAGATOR_BOOLEAN_VALUE
-
PROPAGATOR_DOUBLE_VALUE
-
PROPAGATOR_STRING_VALUE
-
PROPAGATOR_NBT_VALUE
public static final IOperatorValuePropagator<Optional<net.minecraft.nbt.Tag>,IValue> PROPAGATOR_NBT_VALUE -
PROPAGATOR_NBT_COMPOUND_VALUE
public static final IOperatorValuePropagator<Optional<net.minecraft.nbt.CompoundTag>,IValue> PROPAGATOR_NBT_COMPOUND_VALUE -
PROPAGATOR_RESOURCELOCATION_MODNAME
public static final IOperatorValuePropagator<net.minecraft.resources.ResourceLocation,ValueTypeString.ValueString> PROPAGATOR_RESOURCELOCATION_MODNAME -
ARITHMETIC
-
ARITHMETIC_1_SUFFIX
-
ARITHMETIC_2
-
ARITHMETIC_2_PREFIX
-
INTEGER
-
INTEGER_1_SUFFIX
-
INTEGER_2
-
RELATIONAL
-
RELATIONAL_2
-
BINARY
-
BINARY_1_PREFIX
-
BINARY_2
-
STRING
-
STRING_1_PREFIX
-
STRING_2
-
STRING_2_LONG
-
DOUBLE
-
DOUBLE_1_PREFIX
-
NUMBER
-
NUMBER_1_PREFIX
-
NUMBER_1_LONG
-
NULLABLE
-
NULLABLE_1_PREFIX
-
LIST
-
LIST_1_PREFIX
-
BLOCK
-
BLOCK_1_SUFFIX_LONG
-
BLOCK_INFIX_VERYLONG
-
BLOCK_SOUND
public static final IOperatorValuePropagator<OperatorBase.SafeVariablesGetter,Optional<net.minecraft.world.level.block.SoundType>> BLOCK_SOUND -
ITEMSTACK
-
ITEMSTACK_1_PREFIX_LONG
-
ITEMSTACK_1_SUFFIX_LONG
-
ITEMSTACK_2
-
ITEMSTACK_2_LONG
-
ITEMSTACK_1_INTEGER_1
-
FUNCTION_ITEMSTACK
public static final IterativeFunction.PrePostBuilder<net.minecraft.world.item.ItemStack,IValue> FUNCTION_ITEMSTACK -
FUNCTION_ITEMSTACK_TO_INT
public static final IterativeFunction.PrePostBuilder<net.minecraft.world.item.ItemStack,Integer> FUNCTION_ITEMSTACK_TO_INT -
FUNCTION_ITEMSTACK_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<net.minecraft.world.item.ItemStack,Boolean> FUNCTION_ITEMSTACK_TO_BOOLEAN -
FUNCTION_ENERGYSTORAGEITEM
public static final IterativeFunction.PrePostBuilder<net.minecraftforge.energy.IEnergyStorage,IValue> FUNCTION_ENERGYSTORAGEITEM -
FUNCTION_CONTAINERITEM_TO_INT
public static final IterativeFunction.PrePostBuilder<net.minecraftforge.energy.IEnergyStorage,Integer> FUNCTION_CONTAINERITEM_TO_INT -
FUNCTION_CONTAINERITEM_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<net.minecraftforge.energy.IEnergyStorage,Boolean> FUNCTION_CONTAINERITEM_TO_BOOLEAN -
ENTITY
-
ENTITY_1_SUFFIX
-
ENTITY_1_SUFFIX_LONG
-
FUNCTION_ENTITY
public static final IterativeFunction.PrePostBuilder<net.minecraft.world.entity.Entity,IValue> FUNCTION_ENTITY -
FUNCTION_ENTITY_TO_DOUBLE
public static final IterativeFunction.PrePostBuilder<net.minecraft.world.entity.Entity,Double> FUNCTION_ENTITY_TO_DOUBLE -
FUNCTION_ENTITY_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<net.minecraft.world.entity.Entity,Boolean> FUNCTION_ENTITY_TO_BOOLEAN -
FLUIDSTACK
-
FLUIDSTACK_1_SUFFIX_LONG
-
FLUIDSTACK_2
-
FUNCTION_FLUIDSTACK
public static final IterativeFunction.PrePostBuilder<net.minecraftforge.fluids.FluidStack,IValue> FUNCTION_FLUIDSTACK -
FUNCTION_FLUIDSTACK_TO_INT
public static final IterativeFunction.PrePostBuilder<net.minecraftforge.fluids.FluidStack,Integer> FUNCTION_FLUIDSTACK_TO_INT -
FUNCTION_FLUIDSTACK_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<net.minecraftforge.fluids.FluidStack,Boolean> FUNCTION_FLUIDSTACK_TO_BOOLEAN -
FUNCTION_OPERATOR_TAKE_OPERATOR
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,OperatorBase.SafeVariablesGetter>, FUNCTION_OPERATOR_TAKE_OPERATORIValue> -
FUNCTION_ONE_OPERATOR
-
FUNCTION_ONE_PREDICATE
-
FUNCTION_TWO_OPERATORS
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,IOperator>, FUNCTION_TWO_OPERATORSIValue> -
FUNCTION_TWO_PREDICATES
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,IOperator>, FUNCTION_TWO_PREDICATESIValue> -
FUNCTION_THREE_OPERATORS
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Triple<IOperator,IOperator, FUNCTION_THREE_OPERATORSIOperator>, IValue> -
FUNCTION_OPERATOR_TAKE_OPERATOR_LIST
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Pair<IOperator,OperatorBase.SafeVariablesGetter>, FUNCTION_OPERATOR_TAKE_OPERATOR_LISTIValue> -
OPERATOR_CONDITIONAL_OUTPUT_DERIVER
Corresponds toValueHelpers.evaluateOperator(IOperator, IVariable[])
. -
OPERATOR_CONDITIONAL_OUTPUT_DERIVER_LIST
public static OperatorBuilder.IConditionalOutputTypeDeriver OPERATOR_CONDITIONAL_OUTPUT_DERIVER_LISTCorresponds toValueHelpers.evaluateOperator(IOperator, IVariable[])
, but with the input variable being a list. -
OPERATOR
-
OPERATOR_2_INFIX_LONG
-
OPERATOR_1_PREFIX_LONG
-
FUNCTION_STRING_TO_RESOURCE_LOCATION
public static final IterativeFunction.PrePostBuilder<net.minecraft.resources.ResourceLocation,IValue> FUNCTION_STRING_TO_RESOURCE_LOCATION -
NBT
-
NBT_1_PREFIX_LONG
-
NBT_1_SUFFIX_LONG
-
NBT_2
-
NBT_2_NBT
-
NBT_3
-
FUNCTION_NBT
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,IValue> FUNCTION_NBT -
FUNCTION_NBT_COMPOUND_ENTRY
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,IValue> FUNCTION_NBT_COMPOUND_ENTRY -
FUNCTION_NBT_COPY_FOR_VALUE
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Triple<Optional<net.minecraft.nbt.CompoundTag>,String, FUNCTION_NBT_COPY_FOR_VALUEOperatorBase.SafeVariablesGetter>, IValue> -
PROPAGATOR_NBT_COMPOUND
public static final IOperatorValuePropagator<Optional<net.minecraft.nbt.Tag>,Optional<net.minecraft.nbt.CompoundTag>> PROPAGATOR_NBT_COMPOUND -
FUNCTION_NBT_COMPOUND
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.CompoundTag>,IValue> FUNCTION_NBT_COMPOUND -
FUNCTION_NBT_COMPOUND_TO_INT
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.CompoundTag>,Integer> FUNCTION_NBT_COMPOUND_TO_INT -
FUNCTION_NBT_COMPOUND_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.CompoundTag>,Boolean> FUNCTION_NBT_COMPOUND_TO_BOOLEAN -
FUNCTION_NBT_COMPOUND_ENTRY_TO_INT
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Integer> FUNCTION_NBT_COMPOUND_ENTRY_TO_INT -
FUNCTION_NBT_COMPOUND_ENTRY_TO_LONG
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Long> FUNCTION_NBT_COMPOUND_ENTRY_TO_LONG -
FUNCTION_NBT_COMPOUND_ENTRY_TO_DOUBLE
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Double> FUNCTION_NBT_COMPOUND_ENTRY_TO_DOUBLE -
FUNCTION_NBT_COMPOUND_ENTRY_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Boolean> FUNCTION_NBT_COMPOUND_ENTRY_TO_BOOLEAN -
FUNCTION_NBT_COMPOUND_ENTRY_TO_STRING
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,String> FUNCTION_NBT_COMPOUND_ENTRY_TO_STRING -
FUNCTION_NBT_COMPOUND_ENTRY_TO_NBT
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Optional<net.minecraft.nbt.Tag>> FUNCTION_NBT_COMPOUND_ENTRY_TO_NBT -
FUNCTION_NBT_TO_INT
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Integer> FUNCTION_NBT_TO_INT -
FUNCTION_NBT_TO_LONG
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Long> FUNCTION_NBT_TO_LONG -
FUNCTION_NBT_TO_DOUBLE
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Double> FUNCTION_NBT_TO_DOUBLE -
FUNCTION_NBT_TO_BOOLEAN
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Boolean> FUNCTION_NBT_TO_BOOLEAN -
FUNCTION_NBT_TO_STRING
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,String> FUNCTION_NBT_TO_STRING -
FUNCTION_NBT_TO_NBT
public static final IterativeFunction.PrePostBuilder<Optional<net.minecraft.nbt.Tag>,Optional<net.minecraft.nbt.Tag>> FUNCTION_NBT_TO_NBT -
FUNCTION_NBT_COPY_FOR_VALUE_TO_NBT
public static final IterativeFunction.PrePostBuilder<org.apache.commons.lang3.tuple.Triple<Optional<net.minecraft.nbt.CompoundTag>,String, FUNCTION_NBT_COPY_FOR_VALUE_TO_NBTOperatorBase.SafeVariablesGetter>, Optional<net.minecraft.nbt.CompoundTag>> -
INGREDIENTS
-
INGREDIENTS_1_PREFIX_LONG
-
INGREDIENTS_3_ITEMSTACK
-
INGREDIENTS_3_FLUIDSTACK
-
INGREDIENTS_3_LONG
-
INGREDIENTS_2_LIST
-
RECIPE
-
RECIPE_1_SUFFIX_LONG
-
RECIPE_2_INFIX
-
RECIPE_2_PREFIX
-
-
Constructor Details
-
OperatorBuilders
public OperatorBuilders()
-
-
Method Details
-
getSafeOperator
public static IOperator getSafeOperator(ValueTypeOperator.ValueOperator value, IValueType expectedOutput) throws EvaluationException Get the operator from a value in a safe manner.- Parameters:
value
- The operator value.expectedOutput
- The expected output value type.- Returns:
- The operator.
- Throws:
EvaluationException
- If the operator is not a predicate.
-
getSafePredictate
public static IOperator getSafePredictate(ValueTypeOperator.ValueOperator value) throws EvaluationException Get the predicate from a value in a safe manner. It is expected that the operator returns a boolean.- Parameters:
value
- The operator value.- Returns:
- The operator.
- Throws:
EvaluationException
- If the operator is not a predicate.
-
createOperatorTypeValidator
public static OperatorBuilder.ITypeValidator createOperatorTypeValidator(IValueType<?>... expectedSubTypes) Create a type validator for operator operator type validators.- Parameters:
expectedSubTypes
- The expected types that must be present in the operator (not including the first operator type itself.- Returns:
- The type validator instance.
-
createFunctionIngredientsList
public static OperatorBase.IFunction createFunctionIngredientsList(Callable<org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<?, ?>> componentReference) -
unwrapIngredientComponentList
public static <VT extends IValueType<V>,V extends IValue, List<T> unwrapIngredientComponentListT, M> (org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T, M> component, ValueTypeList.ValueList<VT, throws EvaluationExceptionV> list) - Throws:
EvaluationException
-
getItemCapability
public static <T> IterativeFunction.PrePostBuilder<T,IValue> getItemCapability(@Nullable OperatorBuilders.ICapabilityReference<T> capabilityReference) Helper function to create an operator function builder for deriving capabilities from an itemstack.- Type Parameters:
T
- The capability type.- Parameters:
capabilityReference
- The capability instance reference.- Returns:
- The builder.
-