Class ValueTypeBoolean
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase<ValueTypeBoolean.ValueBoolean>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBoolean
- All Implemented Interfaces:
IValueType<ValueTypeBoolean.ValueBoolean>
Value type with values 'true' or 'false'
-
Nested Class Summary
Nested ClassesNested 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.Create an immutable default value.parseString(String value) Parse the given string representation of a value.net.minecraft.nbt.TagSerialize the given value.net.minecraft.network.chat.MutableComponentGet the string representation of the given value.Methods inherited from class org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase
canDeserialize, cast, correspondsTo, getDisplayColor, getDisplayColorFormat, getModId, getTranslationKey, getTypeName, getTypeNamespace, getUniqueName, getUnlocalizedPrefix, isCategory, isObject, loadTooltip, materialize, registerModelResourceLocation, 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
deserializeValuePredicate, getVariableItemOverrideModel, renderISTER
-
Constructor Details
-
ValueTypeBoolean
public ValueTypeBoolean()
-
-
Method Details
-
getDefault
Description copied from interface:IValueTypeCreate an immutable default value.- Returns:
- The default value of this type.
-
toCompactString
public net.minecraft.network.chat.MutableComponent toCompactString(ValueTypeBoolean.ValueBoolean value) - 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.- Parameters:
value- The value to serialize.- Returns:
- The serialized value.
-
deserialize
public ValueTypeBoolean.ValueBoolean deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Description copied from interface:IValueTypeDeserialize the given value.- Parameters:
valueDeseralizationContext- Deserialization context.value- The value to deserialize.- Returns:
- The deserialized value.
-
toString
Description copied from interface:IValueTypeGet the string representation of the given value. This is useful for cases when the value needs to be edited in a GUI. This corresponds toIValueType.parseString(String).- Specified by:
toStringin interfaceIValueType<ValueTypeBoolean.ValueBoolean>- Overrides:
toStringin classValueTypeBase<ValueTypeBoolean.ValueBoolean>- Parameters:
value- A value.- Returns:
- A string representation of the given value.
-
createLogicProgrammerElement
- Specified by:
createLogicProgrammerElementin interfaceIValueType<ValueTypeBoolean.ValueBoolean>- Overrides:
createLogicProgrammerElementin classValueTypeBase<ValueTypeBoolean.ValueBoolean>- Returns:
- A new logic programmer element for this value type.
-
parseString
Description copied from interface:IValueTypeParse the given string representation of a value. This corresponds toIValueType.toString(IValue).- Specified by:
parseStringin interfaceIValueType<ValueTypeBoolean.ValueBoolean>- Overrides:
parseStringin classValueTypeBase<ValueTypeBoolean.ValueBoolean>- Parameters:
value- A string representation of a value.- Returns:
- A value.
- Throws:
EvaluationException- If parsing failed.
-