Class ReferencePlaceholderVariableFacade

java.lang.Object
org.cyclops.integrateddynamics.core.item.VariableFacadeBase
org.cyclops.integrateddynamics.core.item.ReferencePlaceholderVariableFacade
All Implemented Interfaces:
IVariableFacade

public class ReferencePlaceholderVariableFacade extends VariableFacadeBase
Stands in for a referenced variable card in the logic programmer, when the actual card is not available, such as after loading an existing card. It has the id of the referenced card, and resolves to that card in a network.
  • Constructor Details

    • ReferencePlaceholderVariableFacade

      public ReferencePlaceholderVariableFacade(int id, @Nullable IValueType<?> valueType)
  • Method Details

    • getValueType

      @Nullable public IValueType<?> getValueType()
      Returns:
      The type of the referenced variable, or null if unknown.
    • getReferencedFacade

      @Nullable protected IVariableFacade getReferencedFacade(IPartNetwork partNetwork)
    • getVariable

      public <V extends IValue> IVariable<V> getVariable(INetwork network, IPartNetwork partNetwork)
      Description copied from interface: IVariableFacade
      Get the variable.
      Type Parameters:
      V - The value type.
      Parameters:
      network - The network used to look for the variable.
      partNetwork - The part network used to look for the variable.
      Returns:
      The variable.
    • isValid

      public boolean isValid()
      Returns:
      If this is a valid reference.
    • validate

      public void validate(INetwork network, IPartNetwork partNetwork, IVariableFacade.IValidator validator, IValueType containingValueType)
      Description copied from interface: IVariableFacade
      Check if this facade is valid, otherwise notify the validator of any errors.
      Parameters:
      network - The network used to look for the variable.
      partNetwork - The part network used to look for the variable.
      validator - The object to notify errors to.
      containingValueType - The value type in which this variable facade is being used.
    • getOutputType

      public IValueType getOutputType()
      Returns:
      The output type of this variable facade.
    • constructClient

      protected IVariableFacadeClient constructClient()
      Specified by:
      constructClient in class VariableFacadeBase
    • appendHoverText

      public void appendHoverText(Consumer<net.minecraft.network.chat.Component> tooltipAdder, net.minecraft.world.item.Item.TooltipContext context)
      Description copied from interface: IVariableFacade
      Add information about this variable facade to the list.
      Specified by:
      appendHoverText in interface IVariableFacade
      Overrides:
      appendHoverText in class VariableFacadeBase
      Parameters:
      tooltipAdder - The list to add lines to.
      context - The context.