Package com.beansgalaxy.backpacks.screen
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
FieldsModifier and TypeFieldDescriptionfinal BackpackInventoryprotected final net.minecraft.core.NonNullList<MenuSlot>static intintprotected final Backpackprotected final net.minecraft.world.entity.Entityprotected final net.minecraft.core.BlockPosprotected final floatprotected final net.minecraft.world.entity.player.PlayerFields 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
ConstructorsConstructorDescriptionBackpackMenu(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 TypeMethodDescriptionvoidvoidclicked(int slotIndex, int button, net.minecraft.world.inventory.ClickType actionType, net.minecraft.world.entity.player.Player player) static BackpackInventorygetBackpackInventory(int entityId, net.minecraft.world.level.Level level) static net.minecraft.world.item.ItemStackmenuInsert(int button, net.minecraft.world.item.ItemStack cursorStack, int slot, BackpackInventory backpackInventory) net.minecraft.world.item.ItemStackquickMoveStack(net.minecraft.world.entity.player.Player player, int slotId) voidremoved(net.minecraft.world.entity.player.Player player) voidslotsChanged(net.minecraft.world.Container $$0) booleanstillValid(net.minecraft.world.entity.player.Player player) voidMethods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, broadcastFullState, canDragTo, 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
-
Field Details
-
FIRST_SLOT_INDEX
public static int FIRST_SLOT_INDEX -
backpackInventory
-
mirror
-
viewer
protected final net.minecraft.world.entity.player.Player viewer -
owner
protected final net.minecraft.world.entity.Entity owner -
ownerPos
protected final net.minecraft.core.BlockPos ownerPos -
ownerYaw
protected final float ownerYaw -
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:
broadcastChangesin classnet.minecraft.world.inventory.AbstractContainerMenu
-
slotsChanged
public void slotsChanged(net.minecraft.world.Container $$0) - Overrides:
slotsChangedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
getBackpackInventory
public static BackpackInventory getBackpackInventory(int entityId, net.minecraft.world.level.Level level) -
updateSlots
public void updateSlots() -
clicked
public void clicked(int slotIndex, int button, net.minecraft.world.inventory.ClickType actionType, net.minecraft.world.entity.player.Player player) - Overrides:
clickedin classnet.minecraft.world.inventory.AbstractContainerMenu
-
quickMoveStack
public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slotId) - Specified by:
quickMoveStackin classnet.minecraft.world.inventory.AbstractContainerMenu
-
stillValid
public boolean stillValid(net.minecraft.world.entity.player.Player player) - Specified by:
stillValidin classnet.minecraft.world.inventory.AbstractContainerMenu
-
removed
public void removed(net.minecraft.world.entity.player.Player player) - Overrides:
removedin classnet.minecraft.world.inventory.AbstractContainerMenu
-