Class OperatorSerializerDefault
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.OperatorSerializerDefault
- All Implemented Interfaces:
IOperatorSerializer<IOperator>
The default serializer for operators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeserialize(net.minecraft.world.level.storage.ValueInput valueInput) Deserialize the given operator value.net.minecraft.resources.ResourceLocationvoidSerialize the given operator.
-
Constructor Details
-
OperatorSerializerDefault
public OperatorSerializerDefault()
-
-
Method Details
-
canHandle
- Specified by:
canHandlein 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:
getUniqueNamein interfaceIOperatorSerializer<IOperator>- Returns:
- The unique name of this serializer.
-
serialize
public void serialize(net.minecraft.world.level.storage.ValueOutput valueOutput, IOperator operator) Description copied from interface:IOperatorSerializerSerialize the given operator.- Specified by:
serializein interfaceIOperatorSerializer<IOperator>- Parameters:
valueOutput-operator- The operator to serialize.
-
deserialize
Description copied from interface:IOperatorSerializerDeserialize the given operator value.- Specified by:
deserializein interfaceIOperatorSerializer<IOperator>- Parameters:
valueInput-- Returns:
- The deserialized operator, null if deserialization failed.
-