Class OperatorVariableFacade

java.lang.Object
org.cyclops.integrateddynamics.core.item.VariableFacadeBase
org.cyclops.integrateddynamics.core.item.OperatorVariableFacade
All Implemented Interfaces:
IOperatorVariableFacade, IVariableFacade

public class OperatorVariableFacade extends VariableFacadeBase implements IOperatorVariableFacade
Variable facade for variables determined for operators based on other variables in the network determined by their id.
  • Constructor Details

    • OperatorVariableFacade

      public OperatorVariableFacade(boolean generateId, IOperator operator, int[] variableIds)
    • OperatorVariableFacade

      public OperatorVariableFacade(int id, IOperator operator, int[] variableIds)
  • Method Details

    • getOperator

      public IOperator getOperator()
      Specified by:
      getOperator in interface IOperatorVariableFacade
      Returns:
      The operator this facade represents.
    • getVariableIds

      public int[] getVariableIds()
      Specified by:
      getVariableIds in interface IOperatorVariableFacade
      Returns:
      The variable ids that define the inputs of this operator instance.
    • getExpression

      public IExpression getExpression()
      Specified by:
      getExpression in interface IOperatorVariableFacade
      Returns:
      The expression that this operator applies.
    • setExpression

      public void setExpression(IExpression expression)
    • getLastNetworkHash

      public int getLastNetworkHash()
    • setLastNetworkHash

      public void setLastNetworkHash(int lastNetworkHash)
    • getValidatingVariables

      public boolean[] getValidatingVariables()
    • getVariables

      public boolean[] getVariables()
    • getVariable

      public <V extends IValue> IVariable<V> getVariable(INetwork network, IPartNetwork partNetwork)
      Description copied from interface: IVariableFacade
      Get the variable.
      Specified by:
      getVariable in interface IVariableFacade
      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()
      Specified by:
      isValid in interface IVariableFacade
      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.
      Specified by:
      validate in interface IVariableFacade
      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()
      Specified by:
      getOutputType in interface IVariableFacade
      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.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class VariableFacadeBase
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class VariableFacadeBase