Class OperatorSerializerDefault
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.OperatorSerializerDefault
- All Implemented Interfaces:
IOperatorSerializer<IOperator>
The default serializer for operators.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
deserialize
(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Deserialize the given operator value.net.minecraft.resources.ResourceLocation
net.minecraft.nbt.Tag
Serialize the given operator.
-
Constructor Details
-
OperatorSerializerDefault
public OperatorSerializerDefault()
-
-
Method Details
-
canHandle
- Specified by:
canHandle
in interfaceIOperatorSerializer<IOperator>
- 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<IOperator>
- Returns:
- The unique name of this serializer.
-
serialize
Description copied from interface:IOperatorSerializer
Serialize the given operator.- Specified by:
serialize
in interfaceIOperatorSerializer<IOperator>
- Parameters:
operator
- The operator to serialize.- Returns:
- The serialized operator value.
-
deserialize
public IOperator deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Description copied from interface:IOperatorSerializer
Deserialize the given operator value.- Specified by:
deserialize
in interfaceIOperatorSerializer<IOperator>
value
- The operator value to deserialize.- Returns:
- The deserialized operator, null if deserialization failed.
-