Class ProxyVariableFacade

java.lang.Object
org.cyclops.integrateddynamics.core.item.VariableFacadeBase
org.cyclops.integrateddynamics.core.item.ProxyVariableFacade
All Implemented Interfaces:
IProxyVariableFacade, IVariableFacade
Direct Known Subclasses:
DelayVariableFacade

public class ProxyVariableFacade extends VariableFacadeBase implements IProxyVariableFacade
Variable facade for variables determined by proxies.
  • Constructor Details

    • ProxyVariableFacade

      public ProxyVariableFacade(boolean generateId, int proxyId)
    • ProxyVariableFacade

      public ProxyVariableFacade(int id, int proxyId)
  • Method Details

    • getProxy

      protected Optional<BlockEntityProxy> getProxy(IPartNetwork network)
    • getTargetVariable

      protected Optional<IVariable> getTargetVariable(IPartNetwork network)
    • getVariable

      public <V extends IValue> IVariable<V> getVariable(IPartNetwork network)
      Description copied from interface: IVariableFacade
      Get the variable.
      Specified by:
      getVariable in interface IVariableFacade
      Overrides:
      getVariable in class VariableFacadeBase
      Type Parameters:
      V - The value type.
      Parameters:
      network - The object 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.
    • getProxyNotInNetworkError

      protected net.minecraft.network.chat.MutableComponent getProxyNotInNetworkError()
    • getProxyInvalidError

      protected net.minecraft.network.chat.MutableComponent getProxyInvalidError()
    • getProxyInvalidTypeError

      protected net.minecraft.network.chat.MutableComponent getProxyInvalidTypeError(IPartNetwork network, IValueType containingValueType, IValueType actualType)
    • validate

      public void validate(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
      Overrides:
      validate in class VariableFacadeBase
      Parameters:
      partNetwork - The object 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.
    • getProxyTooltip

      protected net.minecraft.network.chat.Component getProxyTooltip()
    • appendHoverText

      public void appendHoverText(List<net.minecraft.network.chat.Component> list, net.minecraft.world.level.Level world)
      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:
      list - The list to add lines to.
      world - The world.
    • addModelOverlay

      public void addModelOverlay(IVariableModelBaked variableModelBaked, List<net.minecraft.client.renderer.block.model.BakedQuad> quads, net.minecraft.util.RandomSource random, net.minecraftforge.client.model.data.ModelData modelData)
      Description copied from interface: IVariableFacade
      Handle the quads for the given baked model.
      Specified by:
      addModelOverlay in interface IVariableFacade
      Parameters:
      variableModelBaked - The baked model.
      quads - The quads that can be added to.
      random - A random instance.
      modelData - Model data.