java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
com.stereowalker.unionlib.world.inventory.UnionMenu

public class UnionMenu extends net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final boolean
     

    Fields inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    CARRIED_SLOT_SIZE, containerId, QUICKCRAFT_HEADER_CONTINUE, QUICKCRAFT_HEADER_END, QUICKCRAFT_HEADER_START, QUICKCRAFT_TYPE_CHARITABLE, QUICKCRAFT_TYPE_CLONE, QUICKCRAFT_TYPE_GREEDY, SLOT_CLICKED_OUTSIDE, slots
  • Constructor Summary

    Constructors
    Constructor
    Description
    UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory)
     
    UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, UnionInventory unionInventory, boolean localWorld, net.minecraft.world.entity.player.Player playerIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slotIn)
    Called to determine if the current slot is valid for the stack merging (double-click) code.
    void
     
    void
    fillCraftSlotsStackedContents(net.minecraft.world.entity.player.StackedContents itemHelperIn)
     
    net.minecraft.world.inventory.CraftingContainer
     
    int
     
    int
     
    net.minecraft.world.inventory.RecipeBookType
     
    int
     
    int
     
    net.minecraft.world.item.ItemStack
    quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index)
    Handle when the stack in slot index is shift-clicked.
    boolean
    recipeMatches(net.minecraft.world.item.crafting.Recipe<? super net.minecraft.world.inventory.CraftingContainer> pRecipe)
     
    void
    removed(net.minecraft.world.entity.player.Player playerIn)
    Called when the container is closed.
    boolean
    shouldMoveToInventory(int p_150591_)
     
    void
    slotsChanged(net.minecraft.world.Container inventoryIn)
    Callback for when the crafting matrix is changed.
    boolean
    stillValid(net.minecraft.world.entity.player.Player playerIn)
    Determines whether supplied player can use this container
    protected static void
    updateCraftingResult(UnionMenu container, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.CraftingContainer pContainer, net.minecraft.world.inventory.ResultContainer inventoryResult)
     

    Methods inherited from class net.minecraft.world.inventory.RecipeBookMenu

    getRecipeBookCategories, handlePlacement

    Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu

    addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotNoCopy, setSynchronizer, stillValid, suppressRemoteUpdates, transferState

    Methods inherited from class java.lang.Object

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

    • isLocalWorld

      public final boolean isLocalWorld
  • Constructor Details

    • UnionMenu

      public UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory)
    • UnionMenu

      public UnionMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, UnionInventory unionInventory, boolean localWorld, net.minecraft.world.entity.player.Player playerIn)
  • Method Details

    • fillCraftSlotsStackedContents

      public void fillCraftSlotsStackedContents(net.minecraft.world.entity.player.StackedContents itemHelperIn)
      Specified by:
      fillCraftSlotsStackedContents in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • clearCraftingContent

      public void clearCraftingContent()
      Specified by:
      clearCraftingContent in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • recipeMatches

      public boolean recipeMatches(net.minecraft.world.item.crafting.Recipe<? super net.minecraft.world.inventory.CraftingContainer> pRecipe)
      Specified by:
      recipeMatches in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • slotsChanged

      public void slotsChanged(net.minecraft.world.Container inventoryIn)
      Callback for when the crafting matrix is changed.
      Overrides:
      slotsChanged in class net.minecraft.world.inventory.AbstractContainerMenu
    • updateCraftingResult

      protected static void updateCraftingResult(UnionMenu container, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.CraftingContainer pContainer, net.minecraft.world.inventory.ResultContainer inventoryResult)
    • removed

      public void removed(net.minecraft.world.entity.player.Player playerIn)
      Called when the container is closed.
      Overrides:
      removed in class net.minecraft.world.inventory.AbstractContainerMenu
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player playerIn)
      Determines whether supplied player can use this container
      Specified by:
      stillValid in class net.minecraft.world.inventory.AbstractContainerMenu
    • quickMoveStack

      public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player playerIn, int index)
      Handle when the stack in slot index is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).
      Specified by:
      quickMoveStack in class net.minecraft.world.inventory.AbstractContainerMenu
    • canTakeItemForPickAll

      public boolean canTakeItemForPickAll(net.minecraft.world.item.ItemStack stack, net.minecraft.world.inventory.Slot slotIn)
      Called to determine if the current slot is valid for the stack merging (double-click) code. The stack passed in is null for the initial slot that was double-clicked.
      Overrides:
      canTakeItemForPickAll in class net.minecraft.world.inventory.AbstractContainerMenu
    • getResultSlotIndex

      public int getResultSlotIndex()
      Specified by:
      getResultSlotIndex in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • getGridWidth

      public int getGridWidth()
      Specified by:
      getGridWidth in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • getGridHeight

      public int getGridHeight()
      Specified by:
      getGridHeight in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • getSize

      public int getSize()
      Specified by:
      getSize in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • getCraftSlots

      public net.minecraft.world.inventory.CraftingContainer getCraftSlots()
    • getRecipeBookType

      public net.minecraft.world.inventory.RecipeBookType getRecipeBookType()
      Specified by:
      getRecipeBookType in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>
    • shouldMoveToInventory

      public boolean shouldMoveToInventory(int p_150591_)
      Specified by:
      shouldMoveToInventory in class net.minecraft.world.inventory.RecipeBookMenu<net.minecraft.world.inventory.CraftingContainer>