Class PredicateOperator.Serializer
java.lang.Object
org.cyclops.integrateddynamics.core.evaluate.operator.PredicateOperator.Serializer
- All Implemented Interfaces:
IOperatorSerializer<PredicateOperator<IValueType<IValue>,
IValue>>
- Enclosing class:
- PredicateOperator<T extends IValueType<V>,
V extends IValue>
public static class PredicateOperator.Serializer
extends Object
implements IOperatorSerializer<PredicateOperator<IValueType<IValue>,IValue>>
-
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
(PredicateOperator<IValueType<IValue>, IValue> operator) Serialize the given operator.
-
Constructor Details
-
Serializer
public Serializer()
-
-
Method Details
-
canHandle
- Specified by:
canHandle
in interfaceIOperatorSerializer<PredicateOperator<IValueType<IValue>,
IValue>> - 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<PredicateOperator<IValueType<IValue>,
IValue>> - Returns:
- The unique name of this serializer.
-
serialize
Description copied from interface:IOperatorSerializer
Serialize the given operator.- Specified by:
serialize
in interfaceIOperatorSerializer<PredicateOperator<IValueType<IValue>,
IValue>> - Parameters:
operator
- The operator to serialize.- Returns:
- The serialized operator value.
-
deserialize
public PredicateOperator<IValueType<IValue>,IValue> deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) throws EvaluationException Description copied from interface:IOperatorSerializer
Deserialize the given operator value.- Specified by:
deserialize
in interfaceIOperatorSerializer<PredicateOperator<IValueType<IValue>,
IValue>> value
- The operator value to deserialize.- Returns:
- The deserialized operator, null if deserialization failed.
- Throws:
EvaluationException
- If something goes wrong while deserializing
-