Class BackpackMenu

java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
com.beansgalaxy.backpacks.screen.BackpackMenu

public class BackpackMenu extends net.minecraft.world.inventory.AbstractContainerMenu
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    protected final net.minecraft.core.NonNullList<MenuSlot>
     
    static int
     
    int
     
    protected final Backpack
     
    protected final net.minecraft.world.level.entity.EntityAccess
     
    protected final net.minecraft.world.entity.player.Player
     

    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
    BackpackMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory)
     
    BackpackMenu(int id, net.minecraft.world.entity.player.Inventory playerInv, net.minecraft.network.FriendlyByteBuf buf)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    boolean
    canDragTo(net.minecraft.world.inventory.Slot slot)
     
    void
    clicked(int slotIndex, int button, net.minecraft.world.inventory.ClickType actionType, net.minecraft.world.entity.player.Player player)
     
    getBackpackInventory(net.minecraft.network.FriendlyByteBuf buf, net.minecraft.world.level.Level level)
     
    static net.minecraft.world.item.ItemStack
    menuInsert(int button, net.minecraft.world.item.ItemStack cursorStack, int slot, BackpackInventory backpackInventory)
     
    net.minecraft.world.item.ItemStack
    quickMoveStack(net.minecraft.world.entity.player.Player player, int slotId)
     
    void
    removed(net.minecraft.world.entity.player.Player player)
     
    void
    slotsChanged(net.minecraft.world.Container $$0)
     
    boolean
    stillValid(net.minecraft.world.entity.player.Player player)
     
    void
     

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

    addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastFullState, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, 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

    • FIRST_SLOT_INDEX

      public static int FIRST_SLOT_INDEX
    • backpackInventory

      public final BackpackInventory backpackInventory
    • mirror

      protected final Backpack mirror
    • viewer

      protected final net.minecraft.world.entity.player.Player viewer
    • owner

      protected final net.minecraft.world.level.entity.EntityAccess owner
    • backpackSlots

      protected final net.minecraft.core.NonNullList<MenuSlot> backpackSlots
    • invOffset

      public int invOffset
  • Constructor Details

    • BackpackMenu

      public BackpackMenu(int id, net.minecraft.world.entity.player.Inventory playerInventory, BackpackInventory backpackInventory)
    • BackpackMenu

      public BackpackMenu(int id, net.minecraft.world.entity.player.Inventory playerInv, net.minecraft.network.FriendlyByteBuf buf)
  • Method Details

    • broadcastChanges

      public void broadcastChanges()
      Overrides:
      broadcastChanges in class net.minecraft.world.inventory.AbstractContainerMenu
    • slotsChanged

      public void slotsChanged(net.minecraft.world.Container $$0)
      Overrides:
      slotsChanged in class net.minecraft.world.inventory.AbstractContainerMenu
    • getBackpackInventory

      public static BackpackInventory getBackpackInventory(net.minecraft.network.FriendlyByteBuf buf, net.minecraft.world.level.Level level)
    • updateSlots

      public void updateSlots()
    • canDragTo

      public boolean canDragTo(net.minecraft.world.inventory.Slot slot)
      Overrides:
      canDragTo in class net.minecraft.world.inventory.AbstractContainerMenu
    • clicked

      public void clicked(int slotIndex, int button, net.minecraft.world.inventory.ClickType actionType, net.minecraft.world.entity.player.Player player)
      Overrides:
      clicked in class net.minecraft.world.inventory.AbstractContainerMenu
    • quickMoveStack

      public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slotId)
      Specified by:
      quickMoveStack in class net.minecraft.world.inventory.AbstractContainerMenu
    • stillValid

      public boolean stillValid(net.minecraft.world.entity.player.Player player)
      Specified by:
      stillValid in class net.minecraft.world.inventory.AbstractContainerMenu
    • removed

      public void removed(net.minecraft.world.entity.player.Player player)
      Overrides:
      removed in class net.minecraft.world.inventory.AbstractContainerMenu