Class TerminalStorageTabIngredientComponentServer<T,M>

java.lang.Object
org.cyclops.integratedterminals.core.terminalstorage.TerminalStorageTabIngredientComponentServer<T,M>
Type Parameters:
T - The instance type.
M - The matching condition parameter.
All Implemented Interfaces:
org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.IIndexChangeObserver<T,M>, ITerminalStorageTabServer
Direct Known Subclasses:
TerminalStorageTabIngredientComponentItemStackCraftingServer

public class TerminalStorageTabIngredientComponentServer<T,M> extends Object implements ITerminalStorageTabServer, org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.IIndexChangeObserver<T,M>
A server-side storage terminal ingredient tab.
  • Constructor Summary

    Constructors
    Constructor
    Description
    TerminalStorageTabIngredientComponentServer(net.minecraft.resources.ResourceLocation name, org.cyclops.integrateddynamics.api.network.INetwork network, org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> ingredientComponent, org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients<T,M> ingredientNetwork, net.minecraft.server.level.ServerPlayer player)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deinitialize the tab when the container is closed.
    protected org.cyclops.cyclopscore.ingredient.collection.diff.IngredientCollectionDiffManager<T,M>
     
    org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients<T,M>
     
    protected Predicate<T>
     
    net.minecraft.resources.ResourceLocation
     
    org.cyclops.integrateddynamics.api.network.INetwork
     
    protected org.cyclops.cyclopscore.ingredient.collection.IIngredientCollapsedCollectionMutable<T,M>
     
    void
    handleStorageSlotClick(net.minecraft.world.inventory.AbstractContainerMenu container, net.minecraft.server.level.ServerPlayer player, TerminalClickType clickType, int channel, T hoveringStorageInstance, int hoveredContainerSlot, long moveQuantityPlayerSlot, T activeStorageInstance, boolean transferFullSelection)
     
    void
    Initializes the tab when the container was opened.
    protected void
    initChannel(int channel)
     
    void
    onChange(org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.StorageChangeEvent<T,M> event)
     
    protected void
     
    protected void
    sendToClient(org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.StorageChangeEvent<T,M> event)
     
    void
    Called on each tick this tab is active.
    void
    updateFilter(List<org.cyclops.integrateddynamics.api.evaluate.variable.IVariable<org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeOperator.ValueOperator>> variables, TerminalStorageTabIngredientComponentCommon<?,?> errorListener)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TerminalStorageTabIngredientComponentServer

      public TerminalStorageTabIngredientComponentServer(net.minecraft.resources.ResourceLocation name, org.cyclops.integrateddynamics.api.network.INetwork network, org.cyclops.commoncapabilities.api.ingredient.IngredientComponent<T,M> ingredientComponent, org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients<T,M> ingredientNetwork, net.minecraft.server.level.ServerPlayer player)
  • Method Details

    • getName

      public net.minecraft.resources.ResourceLocation getName()
      Specified by:
      getName in interface ITerminalStorageTabServer
      Returns:
      The unique tab name, as inherited from ITerminalStorageTab.getName().
    • init

      public void init()
      Description copied from interface: ITerminalStorageTabServer
      Initializes the tab when the container was opened.
      Specified by:
      init in interface ITerminalStorageTabServer
    • initChannel

      protected void initChannel(int channel)
    • deInit

      public void deInit()
      Description copied from interface: ITerminalStorageTabServer
      Deinitialize the tab when the container is closed.
      Specified by:
      deInit in interface ITerminalStorageTabServer
    • updateActive

      public void updateActive()
      Description copied from interface: ITerminalStorageTabServer
      Called on each tick this tab is active.
      Specified by:
      updateActive in interface ITerminalStorageTabServer
    • getUnfilteredIngredientsView

      protected org.cyclops.cyclopscore.ingredient.collection.IIngredientCollapsedCollectionMutable<T,M> getUnfilteredIngredientsView(int channel)
    • getFilteredDiffManager

      protected org.cyclops.cyclopscore.ingredient.collection.diff.IngredientCollectionDiffManager<T,M> getFilteredDiffManager(int channel)
    • updateFilter

      public void updateFilter(List<org.cyclops.integrateddynamics.api.evaluate.variable.IVariable<org.cyclops.integrateddynamics.core.evaluate.variable.ValueTypeOperator.ValueOperator>> variables, TerminalStorageTabIngredientComponentCommon<?,?> errorListener)
    • getIngredientsFilter

      protected Predicate<T> getIngredientsFilter()
    • onChange

      public void onChange(org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.StorageChangeEvent<T,M> event)
      Specified by:
      onChange in interface org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.IIndexChangeObserver<T,M>
    • reApplyFilter

      protected void reApplyFilter()
    • sendToClient

      protected void sendToClient(org.cyclops.integrateddynamics.api.ingredient.IIngredientComponentStorageObservable.StorageChangeEvent<T,M> event)
    • getNetwork

      public org.cyclops.integrateddynamics.api.network.INetwork getNetwork()
    • getIngredientNetwork

      public org.cyclops.integrateddynamics.api.network.IPositionedAddonsNetworkIngredients<T,M> getIngredientNetwork()
    • handleStorageSlotClick

      @Nullable public void handleStorageSlotClick(net.minecraft.world.inventory.AbstractContainerMenu container, net.minecraft.server.level.ServerPlayer player, TerminalClickType clickType, int channel, T hoveringStorageInstance, int hoveredContainerSlot, long moveQuantityPlayerSlot, T activeStorageInstance, boolean transferFullSelection)