Interface IOperatorSerializer<O extends IOperator>
- Type Parameters:
O- The operator type
- All Known Implementing Classes:
CombinedOperator.Conjunction.Serializer,CombinedOperator.Disjunction.Serializer,CombinedOperator.Flip.Serializer,CombinedOperator.ListOperatorSerializer,CombinedOperator.Negation.Serializer,CombinedOperator.Pipe.Serializer,CombinedOperator.Pipe2.Serializer,CurriedOperator.Serializer,OperatorSerializerDefault,PositionedOperator.Serializer,PredicateOperator.Serializer
public interface IOperatorSerializer<O extends IOperator>
A serialization action for operators.
-
Method Summary
Modifier and TypeMethodDescriptionbooleandeserialize(net.minecraft.world.level.storage.ValueInput valueInput) Deserialize the given operator value.net.minecraft.resources.ResourceLocationvoidSerialize the given operator.
-
Method Details
-
canHandle
- Parameters:
operator- The operator to test.- Returns:
- If this can serialize the given operator.
-
getUniqueName
net.minecraft.resources.ResourceLocation getUniqueName()- Returns:
- The unique name of this serializer.
-
serialize
Serialize the given operator.- Parameters:
valueOutput-operator- The operator to serialize.
-
deserialize
Deserialize the given operator value.- Parameters:
valueInput-- Returns:
- The deserialized operator, null if deserialization failed.
- Throws:
EvaluationException- If something goes wrong while deserializing
-