Package net.minecraft.world.inventory
Class InventoryMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu
net.minecraft.world.inventory.AbstractCraftingMenu
net.minecraft.world.inventory.InventoryMenu
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.inventory.RecipeBookMenu
RecipeBookMenu.PostPlaceAction
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
static final int
static final int
static final int
static final int
static final int
static final int
static final int
private static final int
private static final int
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
static final ResourceLocation
static final int
static final int
private final Player
static final int
static final int
private static final EquipmentSlot[]
private static final Map
<EquipmentSlot, ResourceLocation> static final int
static final int
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 -
Method Summary
Modifier and TypeMethodDescriptionboolean
canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.static boolean
isHotbarSlot
(int pIndex) protected Player
owner()
quickMoveStack
(Player pPlayer, int pIndex) Handle when the stack in slotindex
is shift-clicked.void
Called when the container is closed.void
slotsChanged
(Container pInventory) Callback for when the crafting matrix is changed.boolean
stillValid
(Player pPlayer) Determines whether supplied player can use this containerMethods 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
-
Field Details
-
CONTAINER_ID
public static final int CONTAINER_ID- See Also:
-
RESULT_SLOT
public static final int RESULT_SLOT- See Also:
-
CRAFTING_GRID_WIDTH
private static final int CRAFTING_GRID_WIDTH- See Also:
-
CRAFTING_GRID_HEIGHT
private static final int CRAFTING_GRID_HEIGHT- See Also:
-
CRAFT_SLOT_START
public static final int CRAFT_SLOT_START- See Also:
-
CRAFT_SLOT_COUNT
public static final int CRAFT_SLOT_COUNT- See Also:
-
CRAFT_SLOT_END
public static final int CRAFT_SLOT_END- See Also:
-
ARMOR_SLOT_START
public static final int ARMOR_SLOT_START- See Also:
-
ARMOR_SLOT_COUNT
public static final int ARMOR_SLOT_COUNT- See Also:
-
ARMOR_SLOT_END
public static final int ARMOR_SLOT_END- See Also:
-
INV_SLOT_START
public static final int INV_SLOT_START- See Also:
-
INV_SLOT_END
public static final int INV_SLOT_END- See Also:
-
USE_ROW_SLOT_START
public static final int USE_ROW_SLOT_START- See Also:
-
USE_ROW_SLOT_END
public static final int USE_ROW_SLOT_END- See Also:
-
SHIELD_SLOT
public static final int SHIELD_SLOT- See Also:
-
EMPTY_ARMOR_SLOT_HELMET
-
EMPTY_ARMOR_SLOT_CHESTPLATE
-
EMPTY_ARMOR_SLOT_LEGGINGS
-
EMPTY_ARMOR_SLOT_BOOTS
-
EMPTY_ARMOR_SLOT_SHIELD
-
TEXTURE_EMPTY_SLOTS
-
SLOT_IDS
-
active
public final boolean active -
owner
-
-
Constructor Details
-
InventoryMenu
-
-
Method Details
-
isHotbarSlot
public static boolean isHotbarSlot(int pIndex) -
slotsChanged
Callback for when the crafting matrix is changed.- Overrides:
slotsChanged
in classAbstractContainerMenu
-
removed
Called when the container is closed.- Overrides:
removed
in classAbstractContainerMenu
-
stillValid
Determines whether supplied player can use this container- Specified by:
stillValid
in classAbstractContainerMenu
-
quickMoveStack
Handle when the stack in slotindex
is shift-clicked. Normally this moves the stack between the player inventory and the other inventory(s).- Specified by:
quickMoveStack
in classAbstractContainerMenu
-
canTakeItemForPickAll
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 classAbstractContainerMenu
-
getResultSlot
- Specified by:
getResultSlot
in classAbstractCraftingMenu
-
getInputGridSlots
- Specified by:
getInputGridSlots
in classAbstractCraftingMenu
-
getCraftSlots
-
getRecipeBookType
- Specified by:
getRecipeBookType
in classRecipeBookMenu
-
owner
- Specified by:
owner
in classAbstractCraftingMenu
-