Class UnionMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu
net.minecraft.world.inventory.AbstractCraftingMenu
com.stereowalker.unionlib.world.inventory.UnionMenu

public class UnionMenu extends net.minecraft.world.inventory.AbstractCraftingMenu
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.inventory.RecipeBookMenu

    net.minecraft.world.inventory.RecipeBookMenu.PostPlaceAction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final boolean
     

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

    craftSlots, resultSlots

    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, SLOT_SIZE, slots, SLOTS_PER_ROW
  • 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 slot)
    Called to determine if the current slot is valid for the stack merging (double-click) code.
    net.minecraft.world.inventory.CraftingContainer
     
    List<net.minecraft.world.inventory.Slot>
     
    net.minecraft.world.inventory.RecipeBookType
     
    net.minecraft.world.inventory.Slot
     
    protected net.minecraft.world.entity.player.Player
     
    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.
    void
    removed(net.minecraft.world.entity.player.Player playerIn)
    Called when the container is closed.
    protected static void
    slotChangedCraftingGrid(net.minecraft.world.inventory.AbstractContainerMenu pMenu, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.inventory.CraftingContainer pContainer, net.minecraft.world.inventory.ResultContainer pResult, net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> p_345124_)
     
    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

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

    addCraftingGridSlots, addResultSlot, beginPlacingRecipe, fillCraftSlotsStackedContents, finishPlacingRecipe, getGridHeight, getGridWidth, handlePlacement

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

    addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, 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, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, stillValid, suppressRemoteUpdates, transferState

    Methods inherited from class 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

    • 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
    • slotChangedCraftingGrid

      protected static void slotChangedCraftingGrid(net.minecraft.world.inventory.AbstractContainerMenu pMenu, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.player.Player pPlayer, net.minecraft.world.inventory.CraftingContainer pContainer, net.minecraft.world.inventory.ResultContainer pResult, @Nullable net.minecraft.world.item.crafting.RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> p_345124_)
    • 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 slot)
      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
    • getResultSlot

      public net.minecraft.world.inventory.Slot getResultSlot()
      Specified by:
      getResultSlot in class net.minecraft.world.inventory.AbstractCraftingMenu
    • getInputGridSlots

      public List<net.minecraft.world.inventory.Slot> getInputGridSlots()
      Specified by:
      getInputGridSlots in class net.minecraft.world.inventory.AbstractCraftingMenu
    • 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
    • owner

      protected net.minecraft.world.entity.player.Player owner()
      Specified by:
      owner in class net.minecraft.world.inventory.AbstractCraftingMenu