Class ValueObjectTypeItemStack
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase<V>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueObjectTypeBase<ValueObjectTypeItemStack.ValueItemStack>
org.cyclops.integrateddynamics.core.evaluate.variable.ValueObjectTypeItemStack
- All Implemented Interfaces:
IValueType<ValueObjectTypeItemStack.ValueItemStack>,IValueTypeNamed<ValueObjectTypeItemStack.ValueItemStack>,IValueTypeNullable<ValueObjectTypeItemStack.ValueItemStack>,IValueTypeUniquelyNamed<ValueObjectTypeItemStack.ValueItemStack>
public class ValueObjectTypeItemStack
extends ValueObjectTypeBase<ValueObjectTypeItemStack.ValueItemStack>
implements IValueTypeNamed<ValueObjectTypeItemStack.ValueItemStack>, IValueTypeUniquelyNamed<ValueObjectTypeItemStack.ValueItemStack>, IValueTypeNullable<ValueObjectTypeItemStack.ValueItemStack>
Value type with values that are itemstacks.
-
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.MutableComponentgetItemStackDisplayNameSafe(net.minecraft.world.item.ItemStack itemStack) static net.minecraft.network.chat.MutableComponentgetItemStackDisplayNameUsSafe(net.minecraft.world.item.ItemStack itemStack) booleanMaterialize the given value so that it can exist without any external references.net.minecraft.nbt.TagSerialize the given value.net.minecraft.network.chat.MutableComponentMethods inherited from class org.cyclops.integrateddynamics.core.evaluate.variable.ValueObjectTypeBase
isObjectMethods inherited from class org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeBase
canDeserialize, cast, correspondsTo, getDisplayColor, getDisplayColorFormat, getModId, getTranslationKey, getTypeName, getTypeNamespace, getUniqueName, getUnlocalizedPrefix, isCategory, loadTooltip, 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, loadTooltip, parseString, renderISTER, toString
-
Constructor Details
-
ValueObjectTypeItemStack
public ValueObjectTypeItemStack()
-
-
Method Details
-
getItemStackDisplayNameUsSafe
public static net.minecraft.network.chat.MutableComponent getItemStackDisplayNameUsSafe(net.minecraft.world.item.ItemStack itemStack) throws NoSuchMethodException - Throws:
NoSuchMethodException
-
getItemStackDisplayNameSafe
public static net.minecraft.network.chat.MutableComponent getItemStackDisplayNameSafe(net.minecraft.world.item.ItemStack itemStack) -
getDefault
Description copied from interface:IValueTypeCreate an immutable default value.- Specified by:
getDefaultin interfaceIValueType<ValueObjectTypeItemStack.ValueItemStack>- Returns:
- The default value of this type.
-
toCompactString
public net.minecraft.network.chat.MutableComponent toCompactString(ValueObjectTypeItemStack.ValueItemStack value) - Specified by:
toCompactStringin interfaceIValueType<ValueObjectTypeItemStack.ValueItemStack>- 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<ValueObjectTypeItemStack.ValueItemStack>- Parameters:
value- The value to serialize.- Returns:
- The serialized value.
-
deserialize
public ValueObjectTypeItemStack.ValueItemStack deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Description copied from interface:IValueTypeDeserialize the given value.- Specified by:
deserializein interfaceIValueType<ValueObjectTypeItemStack.ValueItemStack>- Parameters:
valueDeseralizationContext- Deserialization context.value- The value to deserialize.- Returns:
- The deserialized value.
-
getName
- Specified by:
getNamein interfaceIValueTypeNamed<ValueObjectTypeItemStack.ValueItemStack>
-
isNull
- Specified by:
isNullin interfaceIValueTypeNullable<ValueObjectTypeItemStack.ValueItemStack>
-
createLogicProgrammerElement
- Specified by:
createLogicProgrammerElementin interfaceIValueType<ValueObjectTypeItemStack.ValueItemStack>- Overrides:
createLogicProgrammerElementin classValueTypeBase<ValueObjectTypeItemStack.ValueItemStack>- Returns:
- A new logic programmer element for this value type.
-
deserializeValuePredicate
public ValuePredicate<ValueObjectTypeItemStack.ValueItemStack> 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<ValueObjectTypeItemStack.ValueItemStack>- Parameters:
element- The JSON element.value- The value.- Returns:
- The value predicate.
-
materialize
public ValueObjectTypeItemStack.ValueItemStack materialize(ValueObjectTypeItemStack.ValueItemStack value) throws EvaluationException Description copied from interface:IValueTypeMaterialize the given value so that it can exist without any external references.- Specified by:
materializein interfaceIValueType<ValueObjectTypeItemStack.ValueItemStack>- Overrides:
materializein classValueTypeBase<ValueObjectTypeItemStack.ValueItemStack>- Parameters:
value- The value to materialize.- Returns:
- The materialized value.
- Throws:
EvaluationException- if materialization fails because of a variable evaluation.
-
getUniqueName
- Specified by:
getUniqueNamein interfaceIValueTypeUniquelyNamed<ValueObjectTypeItemStack.ValueItemStack>
-