Class WirelessGrid
java.lang.Object
com.refinedmods.refinedstorage.blockentity.grid.WirelessGrid
- All Implemented Interfaces:
IGrid,INetworkAwareGrid
-
Field Summary
Fields inherited from interface com.refinedmods.refinedstorage.api.network.grid.IGrid
SEARCH_BOX_MODE_JEI_SYNCHRONIZED, SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY, SEARCH_BOX_MODE_JEI_SYNCHRONIZED_2WAY_AUTOSELECTED, SEARCH_BOX_MODE_JEI_SYNCHRONIZED_AUTOSELECTED, SEARCH_BOX_MODE_NORMAL, SEARCH_BOX_MODE_NORMAL_AUTOSELECTED, SIZE_LARGE, SIZE_MEDIUM, SIZE_SMALL, SIZE_STRETCH, SORTING_DIRECTION_ASCENDING, SORTING_DIRECTION_DESCENDING, SORTING_TYPE_ID, SORTING_TYPE_LAST_MODIFIED, SORTING_TYPE_NAME, SORTING_TYPE_QUANTITY, TABS_PER_PAGE, VIEW_TYPE_CRAFTABLES, VIEW_TYPE_NON_CRAFTABLES, VIEW_TYPE_NORMAL -
Constructor Summary
ConstructorsConstructorDescriptionWirelessGrid(net.minecraft.world.item.ItemStack stack, net.minecraft.server.MinecraftServer server, PlayerSlot slot) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCraftingListener(ICraftingGridListener listener) createListener(net.minecraft.server.level.ServerPlayer player) net.minecraft.world.inventory.CraftingContainernet.minecraft.world.inventory.ResultContainernet.neoforged.neoforge.items.IItemHandlerModifiableintintgetSize()intintintnet.minecraft.world.item.ItemStackgetStack()intgetTabs()intnet.minecraft.network.chat.ComponentgetTitle()intintbooleanvoidonClear(net.minecraft.world.entity.player.Player player) Called when the clear button is pressed in the pattern grid or crafting grid.voidonClosed(net.minecraft.world.entity.player.Player player) Called when the grid is closed.voidonCrafted(net.minecraft.world.entity.player.Player player, IStackList<net.minecraft.world.item.ItemStack> availableItems, IStackList<net.minecraft.world.item.ItemStack> usedItems) Called when an item is crafted in a crafting grid.voidonCraftedShift(net.minecraft.world.entity.player.Player player) Called when an item is crafted with shift click (up to 64 items) in a crafting grid.voidCalled when the crafting matrix changes.voidonRecipeTransfer(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack[][] recipe) Called when a JEI recipe transfer occurs.voidonSearchBoxModeChanged(int searchBoxMode) voidonSizeChanged(int size) voidonSortingDirectionChanged(int direction) voidonSortingTypeChanged(int type) voidonTabPageChanged(int page) voidonTabSelectionChanged(int tab) voidonViewTypeChanged(int type) voidremoveCraftingListener(ICraftingGridListener listener)
-
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
- Specified by:
getGridTypein interfaceIGrid- Returns:
- the grid type
-
getNetwork
- Specified by:
getNetworkin interfaceINetworkAwareGrid- Returns:
- the network, or null if no network is available
-
createListener
- Specified by:
createListenerin interfaceIGrid- 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
- Specified by:
getStorageCachein interfaceIGrid- Returns:
- the storage cache for this grid, or null if this grid is unavailable
-
getItemHandler
- Specified by:
getItemHandlerin interfaceIGrid- Returns:
- the item grid handler, or null if there is no handler available
-
getFluidHandler
- Specified by:
getFluidHandlerin interfaceIGrid- Returns:
- the fluid grid handler, or null if there is no handler available
-
addCraftingListener
- Specified by:
addCraftingListenerin interfaceIGrid- Parameters:
listener- the listener
-
removeCraftingListener
- Specified by:
removeCraftingListenerin interfaceIGrid- Parameters:
listener- the listener
-
getTitle
public net.minecraft.network.chat.Component getTitle() -
getViewType
public int getViewType()- Specified by:
getViewTypein interfaceIGrid- Returns:
- the view type
-
getSortingType
public int getSortingType()- Specified by:
getSortingTypein interfaceIGrid- Returns:
- the sorting type
-
getSortingDirection
public int getSortingDirection()- Specified by:
getSortingDirectionin interfaceIGrid- Returns:
- the sorting direction
-
getSearchBoxMode
public int getSearchBoxMode()- Specified by:
getSearchBoxModein interfaceIGrid- Returns:
- the search box mode
-
getTabSelected
public int getTabSelected()- Specified by:
getTabSelectedin interfaceIGrid- Returns:
- the current tab that is selected
-
getTabPage
public int getTabPage()- Specified by:
getTabPagein interfaceIGrid- Returns:
- the current page that the tab is on
-
getTotalTabPages
public int getTotalTabPages()- Specified by:
getTotalTabPagesin interfaceIGrid- Returns:
- the total amount of tab pages
-
getSize
public int getSize() -
onViewTypeChanged
public void onViewTypeChanged(int type) - Specified by:
onViewTypeChangedin interfaceIGrid- Parameters:
type- the new view type
-
onSortingTypeChanged
public void onSortingTypeChanged(int type) - Specified by:
onSortingTypeChangedin interfaceIGrid- Parameters:
type- the new sorting type
-
onSortingDirectionChanged
public void onSortingDirectionChanged(int direction) - Specified by:
onSortingDirectionChangedin interfaceIGrid- Parameters:
direction- the new direction
-
onSearchBoxModeChanged
public void onSearchBoxModeChanged(int searchBoxMode) - Specified by:
onSearchBoxModeChangedin interfaceIGrid- Parameters:
searchBoxMode- the new search box mode
-
onSizeChanged
public void onSizeChanged(int size) - Specified by:
onSizeChangedin interfaceIGrid- Parameters:
size- the new size mode
-
onTabSelectionChanged
public void onTabSelectionChanged(int tab) - Specified by:
onTabSelectionChangedin interfaceIGrid- Parameters:
tab- the new selected tab
-
onTabPageChanged
public void onTabPageChanged(int page) - Specified by:
onTabPageChangedin interfaceIGrid- Parameters:
page- the new selected page
-
getFilters
- Specified by:
getFiltersin interfaceIGrid- Returns:
- the filters
-
getTabs
-
getFilter
public net.neoforged.neoforge.items.IItemHandlerModifiable getFilter() -
getCraftingMatrix
public net.minecraft.world.inventory.CraftingContainer getCraftingMatrix()- Specified by:
getCraftingMatrixin interfaceIGrid- Returns:
- the crafting matrix, or null if not a crafting grid
-
getCraftingResult
public net.minecraft.world.inventory.ResultContainer getCraftingResult()- Specified by:
getCraftingResultin interfaceIGrid- Returns:
- the crafting result inventory, or null if not a crafting grid
-
onCraftingMatrixChanged
public void onCraftingMatrixChanged()Description copied from interface:IGridCalled when the crafting matrix changes.- Specified by:
onCraftingMatrixChangedin interfaceIGrid
-
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:IGridCalled when an item is crafted in a crafting grid. -
onClear
public void onClear(net.minecraft.world.entity.player.Player player) Description copied from interface:IGridCalled when the clear button is pressed in the pattern grid or crafting grid. -
onCraftedShift
public void onCraftedShift(net.minecraft.world.entity.player.Player player) Description copied from interface:IGridCalled when an item is crafted with shift click (up to 64 items) in a crafting grid.- Specified by:
onCraftedShiftin interfaceIGrid- 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:IGridCalled when a JEI recipe transfer occurs.- Specified by:
onRecipeTransferin interfaceIGrid- Parameters:
player- the playerrecipe- a 9*x array stack array, where x is the possible combinations for the given slot
-
isGridActive
public boolean isGridActive()- Specified by:
isGridActivein interfaceIGrid- Returns:
- true if the grid is active, false otherwise
-
getSlotId
public int getSlotId() -
onClosed
public void onClosed(net.minecraft.world.entity.player.Player player) Description copied from interface:IGridCalled when the grid is closed.
-