Package net.minecraft.world.inventory
Class AbstractCraftingMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu
net.minecraft.world.inventory.AbstractCraftingMenu
- Direct Known Subclasses:
CraftingMenu
,InventoryMenu
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.inventory.RecipeBookMenu
RecipeBookMenu.PostPlaceAction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final CraftingContainer
private final int
protected final ResultContainer
private final int
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
ConstructorsConstructorDescriptionAbstractCraftingMenu
(MenuType<?> pMenuType, int pContainerId, int pWidth, int pHeight) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addCraftingGridSlots
(int pX, int pY) protected Slot
addResultSlot
(Player pPlayer, int pX, int pY) protected void
void
fillCraftSlotsStackedContents
(StackedItemContents pStackedItemContents) protected void
finishPlacingRecipe
(ServerLevel pLevel, RecipeHolder<CraftingRecipe> pRecipe) int
int
abstract Slot
handlePlacement
(boolean pUseMaxItems, boolean pIsCreative, RecipeHolder<?> pRecipe, ServerLevel pLevel, Inventory pPlayerInventory) protected abstract Player
owner()
Methods inherited from class net.minecraft.world.inventory.RecipeBookMenu
getRecipeBookType
Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addInventoryExtendedSlots, addInventoryHotbarSlots, addSlot, addSlotListener, addStandardInventorySlots, broadcastChanges, broadcastFullState, canDragTo, canItemQuickReplace, canTakeItemForPickAll, checkContainerDataCount, checkContainerSize, clearContainer, clicked, clickMenuButton, findSlot, getCarried, getItems, getQuickcraftHeader, getQuickcraftMask, getQuickCraftPlaceCount, getQuickcraftType, getRedstoneSignalFromBlockEntity, getRedstoneSignalFromContainer, getSlot, getStateId, getType, incrementStateId, initializeContents, isValidQuickcraftType, isValidSlotIndex, moveItemStackTo, quickMoveStack, removed, removeSlotListener, resetQuickCraft, resumeRemoteUpdates, sendAllDataToRemote, setCarried, setData, setItem, setRemoteCarried, setRemoteSlot, setRemoteSlotUnsafe, setSelectedBundleItemIndex, setSynchronizer, slotsChanged, stillValid, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
width
private final int width -
height
private final int height -
craftSlots
-
resultSlots
-
-
Constructor Details
-
AbstractCraftingMenu
-
-
Method Details
-
addResultSlot
-
addCraftingGridSlots
protected void addCraftingGridSlots(int pX, int pY) -
handlePlacement
public RecipeBookMenu.PostPlaceAction handlePlacement(boolean pUseMaxItems, boolean pIsCreative, RecipeHolder<?> pRecipe, ServerLevel pLevel, Inventory pPlayerInventory) - Specified by:
handlePlacement
in classRecipeBookMenu
-
beginPlacingRecipe
protected void beginPlacingRecipe() -
finishPlacingRecipe
-
getResultSlot
-
getInputGridSlots
-
getGridWidth
public int getGridWidth() -
getGridHeight
public int getGridHeight() -
owner
-
fillCraftSlotsStackedContents
- Specified by:
fillCraftSlotsStackedContents
in classRecipeBookMenu
-