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 Details

    • getUniqueName

      net.minecraft.resources.ResourceLocation getUniqueName()
      Returns:
      The unique name of this type used to identity variables to this handler.
    • getVariableFacade

      F getVariableFacade(ValueDeseralizationContext valueDeseralizationContext, int id, net.minecraft.nbt.CompoundTag tagCompound)
      Get the variable facade for the given tag.
      Parameters:
      valueDeseralizationContext -
      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

      void setVariableFacade(ValueDeseralizationContext valueDeseralizationContext, net.minecraft.nbt.CompoundTag tagCompound, F variableFacade)
      Set the variable facade for the given tag.
      Parameters:
      valueDeseralizationContext -
      tagCompound - The tag that is used to write variable facade information to.
      variableFacade - The facade to write.
    • isInstance

      boolean isInstance(IVariableFacade variableFacade)
      If the given facade is created by this handler.
      Parameters:
      variableFacade - A facade.
      Returns:
      If it is an instance.
    • isInstance

      boolean isInstance(IVariable<?> variable)
      If the given variable is created by this handler.
      Parameters:
      variable - A variable.
      Returns:
      If it is an instance.