Interface IOperatorRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
,IVariableFacadeHandler<IOperatorVariableFacade>
- All Known Implementing Classes:
OperatorRegistry
public interface IOperatorRegistry
extends org.cyclops.cyclopscore.init.IRegistry, IVariableFacadeHandler<IOperatorVariableFacade>
Registry for
IOperator
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) Deserialize the given operator value.getOperator
(net.minecraft.resources.ResourceLocation operatorName) Get the operator with the given name.getOperatorsInCategory
(String categoryName) Get the operators in the given category.getOperatorsWithInputTypes
(IValueType... valueTypes) Get the operators with the given input value types in that specific order.getOperatorsWithOutputType
(IValueType valueType) Get the operators with the given output value type.Map
<IValueType<?>, Map<String, IOperator>> <O extends IOperator>
Oregister
(O operator) Register a new operator.void
registerSerializer
(IOperatorSerializer serializer) Register an operator serializer.net.minecraft.nbt.Tag
serialize
(ValueDeseralizationContext valueDeseralizationContext, IOperator value) Serialize the given operator.Methods inherited from interface org.cyclops.integrateddynamics.api.item.IVariableFacadeHandler
getUniqueName, getVariableFacade, isInstance, isInstance, setVariableFacade
-
Method Details
-
register
Register a new operator.- Type Parameters:
O
- The operator type.- Parameters:
operator
- The operator.- Returns:
- The registered operator.
-
getOperators
Collection<IOperator> getOperators()- Returns:
- All registered operators.
-
getOperator
Get the operator with the given name.- Parameters:
operatorName
- The unique operator name.- Returns:
- The corresponding operator or null.
-
getOperatorsWithInputTypes
Get the operators with the given input value types in that specific order.- Parameters:
valueTypes
- The input value types.- Returns:
- The corresponding operators.
-
getOperatorsWithOutputType
Get the operators with the given output value type.- Parameters:
valueType
- The output value type.- Returns:
- The corresponding operators.
-
getOperatorsInCategory
Get the operators in the given category.- Parameters:
categoryName
- The name of the operator category.- Returns:
- The corresponding operators.
-
registerSerializer
Register an operator serializer.- Parameters:
serializer
- The operator serializer.
-
serialize
net.minecraft.nbt.Tag serialize(ValueDeseralizationContext valueDeseralizationContext, IOperator value) Serialize the given operator.- Parameters:
valueDeseralizationContext
-value
- The operator to serialize.- Returns:
- The serialized operator value.
-
deserialize
IOperator deserialize(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.Tag value) throws EvaluationException Deserialize the given operator value.- Parameters:
valueDeseralizationContext
-value
- The operator value to deserialize.- Returns:
- The deserialized operator.
- Throws:
EvaluationException
- If an error occurs while deserializing.
-
getGlobalInteractOperators
- Returns:
- Mapping of globally interaction names of operators to their instance.
-
getScopedInteractOperators
Map<IValueType<?>,Map<String, getScopedInteractOperators()IOperator>> - Returns:
- Mapping of value types to locally interaction names of operators to their instance.
-