Interface IVariableFacadeHandler<F extends IVariableFacade>
- Type Parameters:
F- The type of variable facade.
- All Known Subinterfaces:
IAspectRegistry,IOperatorRegistry,IValueTypeRegistry
- All Known Implementing Classes:
AspectRegistry,DelayVariableFacadeHandler,OperatorRegistry,ProxyVariableFacadeHandler,ValueTypeRegistry
public interface IVariableFacadeHandler<F extends IVariableFacade>
Handler for retrieving variable facades from items.
Must be registered in
IVariableFacadeHandlerRegistry.-
Method Summary
Modifier and TypeMethodDescriptiondefault VariableFacadePredicatedeserializeVariableFacadePredicate(com.google.gson.JsonObject element) Deserialize the given JSON element to a variable facade predicate.default VariablePredicatedeserializeVariablePredicate(com.google.gson.JsonObject element, IValueType valueType, ValuePredicate valuePredicate) Deserialize the given JSON element to a variable predicate.net.minecraft.resources.ResourceLocationgetVariableFacade(int id, net.minecraft.nbt.CompoundTag tagCompound) Get the variable facade for the given tag.voidsetVariableFacade(net.minecraft.nbt.CompoundTag tagCompound, F variableFacade) Set the variable facade for the given tag.
-
Method Details
-
getUniqueName
net.minecraft.resources.ResourceLocation getUniqueName()- Returns:
- The unique name of this type used to identity variables to this handler.
-
getVariableFacade
Get the variable facade for the given tag.- Parameters:
id- The id that was read and needs to be inserted into the variable facade.tagCompound- The tag containing information that can be read and used to form a variable facade.- Returns:
- The variable facade
-
setVariableFacade
Set the variable facade for the given tag.- Parameters:
tagCompound- The tag that is used to write variable facade information to.variableFacade- The facade to write.
-
deserializeVariablePredicate
default VariablePredicate deserializeVariablePredicate(com.google.gson.JsonObject element, @Nullable IValueType valueType, ValuePredicate valuePredicate) Deserialize the given JSON element to a variable predicate.- Parameters:
element- The JSON element.valueType- The optional value type.valuePredicate- The value predicate.- Returns:
- The variable predicate.
-
deserializeVariableFacadePredicate
default VariableFacadePredicate deserializeVariableFacadePredicate(com.google.gson.JsonObject element) Deserialize the given JSON element to a variable facade predicate.- Parameters:
element- The JSON element.- Returns:
- The variable facade predicate.
-