Class ValueTypeOperator
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase<ValueTypeOperator.ValueOperator>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeOperator
- All Implemented Interfaces:
IValueType<ValueTypeOperator.ValueOperator>,IValueTypeNamed<ValueTypeOperator.ValueOperator>,IValueTypeUniquelyNamed<ValueTypeOperator.ValueOperator>
public class ValueTypeOperator
extends ValueTypeBase<ValueTypeOperator.ValueOperator>
implements IValueTypeNamed<ValueTypeOperator.ValueOperator>, IValueTypeUniquelyNamed<ValueTypeOperator.ValueOperator>
Value type with operator values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classNested classes/interfaces inherited from interface org.cyclops.integrateddynamics.api.evaluate.variable.IValueType
IValueType.ValueTypeComparator -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Deserialize the given value.deserializeValuePredicate(com.google.gson.JsonObject element, IValue value) Deserialize the given JSON element to a value predicate.Create an immutable default value.static net.minecraft.network.chat.MutableComponentgetSignature(IOperator operator) Pretty formatted signature of an operator.static net.minecraft.network.chat.ComponentgetSignature(IValueType[] inputTypes, IValueType outputType) Pretty formatted signature of an operator.static List<net.minecraft.network.chat.MutableComponent>getSignatureLines(IOperator operator, boolean indent) Pretty formatted signature of an operator.static List<net.minecraft.network.chat.MutableComponent>getSignatureLines(IValueType[] inputTypes, IValueType outputType, boolean indent) Pretty formatted signature of an operator.voidloadTooltip(List<net.minecraft.network.chat.Component> lines, boolean appendOptionalInfo, ValueTypeOperator.ValueOperator value) Add tooltip lines for this aspect when hovered in a gui.Materialize the given value so that it can exist without any external references.net.minecraft.nbt.TagSerialize the given value.protected static net.minecraft.network.chat.MutableComponentswitchSignatureLineContext(List<net.minecraft.network.chat.MutableComponent> lines, net.minecraft.network.chat.MutableComponent sb) net.minecraft.network.chat.MutableComponentMethods inherited from class org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase
canDeserialize, cast, correspondsTo, getDisplayColor, getDisplayColorFormat, getModId, getTranslationKey, getTypeName, getTypeNamespace, getUniqueName, getUnlocalizedPrefix, isCategory, isObject, parseString, registerModelResourceLocation, toString, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cyclops.integrateddynamics.api.evaluate.variable.IValueType
canDeserialize, cast, correspondsTo, getDisplayColor, getDisplayColorFormat, getTranslationKey, getTypeName, getUniqueName, getVariableItemOverrideModel, isCategory, isObject, parseString, renderISTER, toString
-
Constructor Details
-
ValueTypeOperator
public ValueTypeOperator()
-
-
Method Details
-
getDefault
Description copied from interface:IValueTypeCreate an immutable default value.- Specified by:
getDefaultin interfaceIValueType<ValueTypeOperator.ValueOperator>- Returns:
- The default value of this type.
-
toCompactString
public net.minecraft.network.chat.MutableComponent toCompactString(ValueTypeOperator.ValueOperator value) - Specified by:
toCompactStringin interfaceIValueType<ValueTypeOperator.ValueOperator>- Parameters:
value- The value- Returns:
- A short string representation used in guis to show the value.
-
serialize
Description copied from interface:IValueTypeSerialize the given value.- Specified by:
serializein interfaceIValueType<ValueTypeOperator.ValueOperator>- Parameters:
value- The value to serialize.- Returns:
- The serialized value.
-
deserialize
public ValueTypeOperator.ValueOperator deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Description copied from interface:IValueTypeDeserialize the given value.- Specified by:
deserializein interfaceIValueType<ValueTypeOperator.ValueOperator>- Parameters:
valueDeseralizationContext- Deserialization context.value- The value to deserialize.- Returns:
- The deserialized value.
-
loadTooltip
public void loadTooltip(List<net.minecraft.network.chat.Component> lines, boolean appendOptionalInfo, @Nullable ValueTypeOperator.ValueOperator value) Description copied from interface:IValueTypeAdd tooltip lines for this aspect when hovered in a gui.- Specified by:
loadTooltipin interfaceIValueType<ValueTypeOperator.ValueOperator>- Overrides:
loadTooltipin classValueTypeBase<ValueTypeOperator.ValueOperator>- Parameters:
lines- The list to add lines to.appendOptionalInfo- If shift-to-show info should be added.value- The value to show the tooltip for.
-
createLogicProgrammerElement
- Specified by:
createLogicProgrammerElementin interfaceIValueType<ValueTypeOperator.ValueOperator>- Overrides:
createLogicProgrammerElementin classValueTypeBase<ValueTypeOperator.ValueOperator>- Returns:
- A new logic programmer element for this value type.
-
deserializeValuePredicate
public ValuePredicate<ValueTypeOperator.ValueOperator> deserializeValuePredicate(com.google.gson.JsonObject element, @Nullable IValue value) Description copied from interface:IValueTypeDeserialize the given JSON element to a value predicate.- Specified by:
deserializeValuePredicatein interfaceIValueType<ValueTypeOperator.ValueOperator>- Parameters:
element- The JSON element.value- The value.- Returns:
- The value predicate.
-
materialize
public ValueTypeOperator.ValueOperator materialize(ValueTypeOperator.ValueOperator value) throws EvaluationException Description copied from interface:IValueTypeMaterialize the given value so that it can exist without any external references.- Specified by:
materializein interfaceIValueType<ValueTypeOperator.ValueOperator>- Overrides:
materializein classValueTypeBase<ValueTypeOperator.ValueOperator>- Parameters:
value- The value to materialize.- Returns:
- The materialized value.
- Throws:
EvaluationException- if materialization fails because of a variable evaluation.
-
getSignature
Pretty formatted signature of an operator.- Parameters:
operator- The operator.- Returns:
- The signature.
-
getSignature
public static net.minecraft.network.chat.Component getSignature(IValueType[] inputTypes, IValueType outputType) Pretty formatted signature of an operator.- Parameters:
inputTypes- The input types.outputType- The output types.- Returns:
- The signature.
-
switchSignatureLineContext
protected static net.minecraft.network.chat.MutableComponent switchSignatureLineContext(List<net.minecraft.network.chat.MutableComponent> lines, net.minecraft.network.chat.MutableComponent sb) -
getSignatureLines
public static List<net.minecraft.network.chat.MutableComponent> getSignatureLines(IValueType[] inputTypes, IValueType outputType, boolean indent) Pretty formatted signature of an operator.- Parameters:
inputTypes- The input types.outputType- The output types.indent- If the lines should be indented.- Returns:
- The signature.
-
getSignatureLines
public static List<net.minecraft.network.chat.MutableComponent> getSignatureLines(IOperator operator, boolean indent) Pretty formatted signature of an operator.- Parameters:
operator- The operator.indent- If the lines should be indented.- Returns:
- The signature.
-
getName
- Specified by:
getNamein interfaceIValueTypeNamed<ValueTypeOperator.ValueOperator>
-
getUniqueName
- Specified by:
getUniqueNamein interfaceIValueTypeUniquelyNamed<ValueTypeOperator.ValueOperator>
-