Class AbstractCraftingGridContainerMenu

All Implemented Interfaces:
PreviewProvider, GridWatcher, GridExtractionStrategy, GridInsertionStrategy, GridScrollingStrategy, ScreenSizeListener
Direct Known Subclasses:
CraftingGridContainerMenu

public abstract class AbstractCraftingGridContainerMenu extends AbstractGridContainerMenu
  • Constructor Details

    • AbstractCraftingGridContainerMenu

      protected AbstractCraftingGridContainerMenu(net.minecraft.world.inventory.MenuType<? extends AbstractGridContainerMenu> menuType, int syncId, net.minecraft.world.entity.player.Inventory playerInventory, GridData gridData)
    • AbstractCraftingGridContainerMenu

      protected AbstractCraftingGridContainerMenu(net.minecraft.world.inventory.MenuType<? extends AbstractGridContainerMenu> menuType, int syncId, net.minecraft.world.entity.player.Inventory playerInventory, CraftingGrid craftingGrid)
  • Method Details

    • setActivenessListener

      public void setActivenessListener(@Nullable Consumer<Boolean> activenessListener)
    • onActiveChanged

      public void onActiveChanged(boolean newActive)
      Description copied from interface: GridWatcher
      Called when the activeness state of the grid has changed.
      Specified by:
      onActiveChanged in interface GridWatcher
      Overrides:
      onActiveChanged in class AbstractGridContainerMenu
      Parameters:
      newActive - the new activeness state
    • canTakeItemForPickAll

      public boolean canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slot)
      Overrides:
      canTakeItemForPickAll in class AbstractResourceContainerMenu
    • quickMoveStack

      public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player actor, int slotIndex)
      Overrides:
      quickMoveStack in class AbstractGridContainerMenu
    • resized

      public void resized(int playerInventoryY, int topYStart, int topYEnd)
      Specified by:
      resized in interface ScreenSizeListener
      Overrides:
      resized in class AbstractGridContainerMenu
    • getCraftingMatrixSlots

      public List<net.minecraft.world.inventory.Slot> getCraftingMatrixSlots()
    • clear

      public void clear(boolean toPlayerInventory)
    • getAvailableListForRecipeTransfer

      @API(status=INTERNAL) public MutableResourceList getAvailableListForRecipeTransfer()
    • transferRecipe

      public void transferRecipe(List<List<ItemResource>> recipe)
    • filterBasedOnCraftingMatrixItems

      public void filterBasedOnCraftingMatrixItems()
    • stopFilteringBasedOnCraftingMatrixItems

      public void stopFilteringBasedOnCraftingMatrixItems()
    • getResourceForAutocraftableHint

      @Nullable protected ResourceKey getResourceForAutocraftableHint(net.minecraft.world.inventory.Slot slot)
      Overrides:
      getResourceForAutocraftableHint in class AbstractGridContainerMenu
    • isLargeSlot

      public boolean isLargeSlot(net.minecraft.world.inventory.Slot slot)
      Overrides:
      isLargeSlot in class AbstractGridContainerMenu