Class CurriedOperator
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.CurriedOperator
- All Implemented Interfaces:
IOperator
An operator that is partially being applied.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IValueType[]deriveFullInputTypes(IValueType[] partialInput) protected IVariable[]deriveFullInputVariables(IVariable[] partialInput) booleanEvaluate the given input values for this operator.protected StringgetConditionalOutputType(IVariable[] input) Get the output value type depending on the active input of the operator.@Nullable Stringnet.minecraft.network.chat.MutableComponentintnet.minecraft.resources.ResourceLocationinthashCode()voidloadTooltip(Consumer<net.minecraft.network.chat.Component> tooltipAdder, boolean appendOptionalInfo) Add tooltip lines for this aspect when hovered in a gui.Materialize this operator so that it can exist without any external references.booleannet.minecraft.network.chat.MutableComponentvalidateTypes(IValueType[] input) Check the given input value types for this operator.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.evaluate.operator.IOperator
getGlobalInteractName, getScopedInteractName
-
Constructor Details
-
CurriedOperator
-
-
Method Details
-
getAppliedSymbol
-
getSymbol
-
getUniqueName
public net.minecraft.resources.ResourceLocation getUniqueName()- Specified by:
getUniqueNamein interfaceIOperator- Returns:
- The unique name for this operator, only used for internal storage.
-
getInteractName
- Specified by:
getInteractNamein interfaceIOperator- Returns:
- The unique interact name for this operator, when interacting with this operator using external contexts, such as Integrated Scripting.
-
getGlobalInteractNamePrefix
- Specified by:
getGlobalInteractNamePrefixin interfaceIOperator- Returns:
- Override for the default global interact name prefix.
-
shouldAlsoPrefixLocalScope
public boolean shouldAlsoPrefixLocalScope()- Specified by:
shouldAlsoPrefixLocalScopein interfaceIOperator- Returns:
- If the global interact name prefix should also be used for local scopes.
-
getTranslationKey
- Specified by:
getTranslationKeyin interfaceIOperator- Returns:
- The unique unlocalized name for this operator.
-
getUnlocalizedCategoryName
- Specified by:
getUnlocalizedCategoryNamein interfaceIOperator- Returns:
- The unique unlocalized category name for this operator.
-
getLocalizedNameFull
public net.minecraft.network.chat.MutableComponent getLocalizedNameFull()- Specified by:
getLocalizedNameFullin interfaceIOperator- Returns:
- The localized full name for this operator, includes category name
-
loadTooltip
public void loadTooltip(Consumer<net.minecraft.network.chat.Component> tooltipAdder, boolean appendOptionalInfo) Description copied from interface:IOperatorAdd tooltip lines for this aspect when hovered in a gui.- Specified by:
loadTooltipin interfaceIOperator- Parameters:
tooltipAdder- The list to add lines to.appendOptionalInfo- If shift-to-show info should be added.
-
getInputTypes
- Specified by:
getInputTypesin interfaceIOperator- Returns:
- The ordered types of values that are used as input for this operator.
-
getOutputType
- Specified by:
getOutputTypein interfaceIOperator- Returns:
- The type of value that is achieved when this operator is executed.
-
deriveFullInputVariables
-
deriveFullInputTypes
-
getConditionalOutputType
Description copied from interface:IOperatorGet the output value type depending on the active input of the operator.- Specified by:
getConditionalOutputTypein interfaceIOperator- Parameters:
input- The input that would be given during evaluation.- Returns:
- The type of value that is achieved when this operator is executed.
-
evaluate
Description copied from interface:IOperatorEvaluate the given input values for this operator.- Specified by:
evaluatein interfaceIOperator- Parameters:
input- The ordered input values.- Returns:
- The output value.
- Throws:
EvaluationException- When something went wrong while evaluating.
-
getRequiredInputLength
public int getRequiredInputLength()- Specified by:
getRequiredInputLengthin interfaceIOperator- Returns:
- The required input length.
-
validateTypes
Description copied from interface:IOperatorCheck the given input value types for this operator.- Specified by:
validateTypesin interfaceIOperator- Parameters:
input- The ordered input value types.- Returns:
- An error or null if valid.
-
getRenderPattern
- Specified by:
getRenderPatternin interfaceIOperator- Returns:
- The render pattern for this operator inside the logic programmer.
-
materialize
Description copied from interface:IOperatorMaterialize this operator so that it can exist without any external references.- Specified by:
materializein interfaceIOperator- Returns:
- The materialized operator.
- Throws:
EvaluationException- if materialization fails because of a variable evaluation.
-
getBaseOperator
-
equals
-
hashCode
public int hashCode()
-