Class CurriedOperator.Serializer
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.CurriedOperator.Serializer
- All Implemented Interfaces:
IOperatorSerializer<CurriedOperator>
- Enclosing class:
- CurriedOperator
public static class CurriedOperator.Serializer
extends Object
implements IOperatorSerializer<CurriedOperator>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deserialize
(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag valueOperator) Deserialize the given operator value.net.minecraft.resources.ResourceLocation
net.minecraft.nbt.Tag
serialize
(CurriedOperator operator) Serialize the given operator.
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
canHandle
- Specified by:
canHandle
in interfaceIOperatorSerializer<CurriedOperator>
- Parameters:
operator
- The operator to test.- Returns:
- If this can serialize the given operator.
-
getUniqueName
public net.minecraft.resources.ResourceLocation getUniqueName()- Specified by:
getUniqueName
in interfaceIOperatorSerializer<CurriedOperator>
- Returns:
- The unique name of this serializer.
-
serialize
Description copied from interface:IOperatorSerializer
Serialize the given operator.- Specified by:
serialize
in interfaceIOperatorSerializer<CurriedOperator>
- Parameters:
operator
- The operator to serialize.- Returns:
- The serialized operator value.
-
deserialize
public CurriedOperator deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag valueOperator) throws EvaluationException Description copied from interface:IOperatorSerializer
Deserialize the given operator value.- Specified by:
deserialize
in interfaceIOperatorSerializer<CurriedOperator>
valueOperator
- The operator value to deserialize.- Returns:
- The deserialized operator, null if deserialization failed.
- Throws:
EvaluationException
- If something goes wrong while deserializing
-