java.lang.Object
com.refinedmods.refinedstorage.blockentity.grid.WirelessGrid
All Implemented Interfaces:
IGrid, INetworkAwareGrid

public class WirelessGrid extends Object implements INetworkAwareGrid
  • Constructor Details

    • WirelessGrid

      public WirelessGrid(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.server.MinecraftServer server, PlayerSlot slot)
  • Method Details

    • getStack

      public net.minecraft.world.item.ItemStack getStack()
    • getGridType

      public GridType getGridType()
      Specified by:
      getGridType in interface IGrid
      Returns:
      the grid type
    • getNetwork

      @Nullable public INetwork getNetwork()
      Specified by:
      getNetwork in interface INetworkAwareGrid
      Returns:
      the network, or null if no network is available
    • createListener

      public IStorageCacheListener createListener(net.minecraft.server.level.ServerPlayer player)
      Specified by:
      createListener in interface IGrid
      Parameters:
      player - the player to create a listener for
      Returns:
      a listener for this grid, will be attached to the storage cache in IGrid.getStorageCache()
    • getStorageCache

      @Nullable public IStorageCache getStorageCache()
      Specified by:
      getStorageCache in interface IGrid
      Returns:
      the storage cache for this grid, or null if this grid is unavailable
    • getItemHandler

      @Nullable public IItemGridHandler getItemHandler()
      Specified by:
      getItemHandler in interface IGrid
      Returns:
      the item grid handler, or null if there is no handler available
    • getFluidHandler

      @Nullable public IFluidGridHandler getFluidHandler()
      Specified by:
      getFluidHandler in interface IGrid
      Returns:
      the fluid grid handler, or null if there is no handler available
    • addCraftingListener

      public void addCraftingListener(ICraftingGridListener listener)
      Specified by:
      addCraftingListener in interface IGrid
      Parameters:
      listener - the listener
    • removeCraftingListener

      public void removeCraftingListener(ICraftingGridListener listener)
      Specified by:
      removeCraftingListener in interface IGrid
      Parameters:
      listener - the listener
    • getTitle

      public net.minecraft.network.chat.Component getTitle()
      Specified by:
      getTitle in interface IGrid
      Returns:
      the title
    • getViewType

      public int getViewType()
      Specified by:
      getViewType in interface IGrid
      Returns:
      the view type
    • getSortingType

      public int getSortingType()
      Specified by:
      getSortingType in interface IGrid
      Returns:
      the sorting type
    • getSortingDirection

      public int getSortingDirection()
      Specified by:
      getSortingDirection in interface IGrid
      Returns:
      the sorting direction
    • getSearchBoxMode

      public int getSearchBoxMode()
      Specified by:
      getSearchBoxMode in interface IGrid
      Returns:
      the search box mode
    • getTabSelected

      public int getTabSelected()
      Specified by:
      getTabSelected in interface IGrid
      Returns:
      the current tab that is selected
    • getTabPage

      public int getTabPage()
      Specified by:
      getTabPage in interface IGrid
      Returns:
      the current page that the tab is on
    • getTotalTabPages

      public int getTotalTabPages()
      Specified by:
      getTotalTabPages in interface IGrid
      Returns:
      the total amount of tab pages
    • getSize

      public int getSize()
      Specified by:
      getSize in interface IGrid
      Returns:
      the size mode
    • onViewTypeChanged

      public void onViewTypeChanged(int type)
      Specified by:
      onViewTypeChanged in interface IGrid
      Parameters:
      type - the new view type
    • onSortingTypeChanged

      public void onSortingTypeChanged(int type)
      Specified by:
      onSortingTypeChanged in interface IGrid
      Parameters:
      type - the new sorting type
    • onSortingDirectionChanged

      public void onSortingDirectionChanged(int direction)
      Specified by:
      onSortingDirectionChanged in interface IGrid
      Parameters:
      direction - the new direction
    • onSearchBoxModeChanged

      public void onSearchBoxModeChanged(int searchBoxMode)
      Specified by:
      onSearchBoxModeChanged in interface IGrid
      Parameters:
      searchBoxMode - the new search box mode
    • onSizeChanged

      public void onSizeChanged(int size)
      Specified by:
      onSizeChanged in interface IGrid
      Parameters:
      size - the new size mode
    • onTabSelectionChanged

      public void onTabSelectionChanged(int tab)
      Specified by:
      onTabSelectionChanged in interface IGrid
      Parameters:
      tab - the new selected tab
    • onTabPageChanged

      public void onTabPageChanged(int page)
      Specified by:
      onTabPageChanged in interface IGrid
      Parameters:
      page - the new selected page
    • getFilters

      public List<IFilter> getFilters()
      Specified by:
      getFilters in interface IGrid
      Returns:
      the filters
    • getTabs

      public List<IGridTab> getTabs()
      Specified by:
      getTabs in interface IGrid
      Returns:
      the tabs
    • getFilter

      public net.neoforged.neoforge.items.IItemHandlerModifiable getFilter()
      Specified by:
      getFilter in interface IGrid
      Returns:
      the inventory of the filters
    • getCraftingMatrix

      public net.minecraft.world.inventory.CraftingContainer getCraftingMatrix()
      Specified by:
      getCraftingMatrix in interface IGrid
      Returns:
      the crafting matrix, or null if not a crafting grid
    • getCraftingResult

      public net.minecraft.world.inventory.ResultContainer getCraftingResult()
      Specified by:
      getCraftingResult in interface IGrid
      Returns:
      the crafting result inventory, or null if not a crafting grid
    • onCraftingMatrixChanged

      public void onCraftingMatrixChanged()
      Description copied from interface: IGrid
      Called when the crafting matrix changes.
      Specified by:
      onCraftingMatrixChanged in interface IGrid
    • onCrafted

      public void onCrafted(net.minecraft.world.entity.player.Player player, @Nullable IStackList<net.minecraft.world.item.ItemStack> availableItems, @Nullable IStackList<net.minecraft.world.item.ItemStack> usedItems)
      Description copied from interface: IGrid
      Called when an item is crafted in a crafting grid.
      Specified by:
      onCrafted in interface IGrid
      Parameters:
      player - the player that crafted the item
      availableItems - the items available for shift crafting
      usedItems - the items used by shift crafting
    • onClear

      public void onClear(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IGrid
      Called when the clear button is pressed in the pattern grid or crafting grid.
      Specified by:
      onClear in interface IGrid
    • onCraftedShift

      public void onCraftedShift(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IGrid
      Called when an item is crafted with shift click (up to 64 items) in a crafting grid.
      Specified by:
      onCraftedShift in interface IGrid
      Parameters:
      player - the player that crafted the item
    • onRecipeTransfer

      public void onRecipeTransfer(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack[][] recipe)
      Description copied from interface: IGrid
      Called when a JEI recipe transfer occurs.
      Specified by:
      onRecipeTransfer in interface IGrid
      Parameters:
      player - the player
      recipe - a 9*x array stack array, where x is the possible combinations for the given slot
    • isGridActive

      public boolean isGridActive()
      Specified by:
      isGridActive in interface IGrid
      Returns:
      true if the grid is active, false otherwise
    • getSlotId

      public int getSlotId()
      Specified by:
      getSlotId in interface IGrid
      Returns:
      the slot id where this grid is located, if applicable, otherwise -1
    • onClosed

      public void onClosed(net.minecraft.world.entity.player.Player player)
      Description copied from interface: IGrid
      Called when the grid is closed.
      Specified by:
      onClosed in interface IGrid
      Parameters:
      player - the player