Class ValueTypeString
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase<ValueTypeString.ValueString>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeString
- All Implemented Interfaces:
IValueType<ValueTypeString.ValueString>,IValueTypeNamed<ValueTypeString.ValueString>
public class ValueTypeString
extends ValueTypeBase<ValueTypeString.ValueString>
implements IValueTypeNamed<ValueTypeString.ValueString>
Value type with values that are strings.
-
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, createLogicProgrammerElement, 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
canDeserialize, cast, correspondsTo, createLogicProgrammerElement, deserializeValuePredicate, getDisplayColor, getDisplayColorFormat, getTranslationKey, getTypeName, getUniqueName, getVariableItemOverrideModel, isCategory, isObject, loadTooltip, materialize, renderISTER
-
Constructor Details
-
ValueTypeString
public ValueTypeString()
-
-
Method Details
-
getDefault
Description copied from interface:IValueTypeCreate an immutable default value.- Specified by:
getDefaultin interfaceIValueType<ValueTypeString.ValueString>- Returns:
- The default value of this type.
-
toCompactString
public net.minecraft.network.chat.MutableComponent toCompactString(ValueTypeString.ValueString value) - Specified by:
toCompactStringin interfaceIValueType<ValueTypeString.ValueString>- 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<ValueTypeString.ValueString>- Parameters:
value- The value to serialize.- Returns:
- The serialized value.
-
deserialize
public ValueTypeString.ValueString deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Description copied from interface:IValueTypeDeserialize the given value.- Specified by:
deserializein interfaceIValueType<ValueTypeString.ValueString>- 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<ValueTypeString.ValueString>- Overrides:
toStringin classValueTypeBase<ValueTypeString.ValueString>- Parameters:
value- A value.- Returns:
- A string representation of the given value.
-
parseString
Description copied from interface:IValueTypeParse the given string representation of a value. This corresponds toIValueType.toString(IValue).- Specified by:
parseStringin interfaceIValueType<ValueTypeString.ValueString>- Overrides:
parseStringin classValueTypeBase<ValueTypeString.ValueString>- Parameters:
value- A string representation of a value.- Returns:
- A value.
- Throws:
EvaluationException- If parsing failed.
-
getName
- Specified by:
getNamein interfaceIValueTypeNamed<ValueTypeString.ValueString>
-