Package net.minecraft.world.inventory
Class SmithingMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.ItemCombinerMenu
net.minecraft.world.inventory.SmithingMenu
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
private final Level
private final List
<RecipeHolder<SmithingRecipe>> static final int
private static final int
private RecipeHolder
<SmithingRecipe> static final int
static final int
static final int
Fields inherited from class net.minecraft.world.inventory.ItemCombinerMenu
access, inputSlots, player, 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, slots
-
Constructor Summary
ConstructorsConstructorDescriptionSmithingMenu
(int pContainerId, Inventory pPlayerInventory) SmithingMenu
(int pContainerId, Inventory pPlayerInventory, ContainerLevelAccess pAccess) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canMoveIntoInputSlots
(ItemStack pStack) boolean
canTakeItemForPickAll
(ItemStack pStack, Slot pSlot) Called to determine if the current slot is valid for the stack merging (double-click) code.protected ItemCombinerMenuSlotDefinition
private SmithingRecipeInput
void
private static OptionalInt
findSlotMatchingIngredient
(SmithingRecipe pRecipe, ItemStack pStack) private OptionalInt
findSlotToQuickMoveTo
(ItemStack pStack) int
getSlotToQuickMoveTo
(ItemStack pStack) protected boolean
isValidBlock
(BlockState pState) protected boolean
protected void
private void
shrinkStackInSlot
(int pIndex) Methods inherited from class net.minecraft.world.inventory.ItemCombinerMenu
getResultSlot, quickMoveStack, removed, slotsChanged, stillValid
Methods inherited from class net.minecraft.world.inventory.AbstractContainerMenu
addDataSlot, addDataSlots, addSlot, addSlotListener, 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, setRemoteSlotNoCopy, setSynchronizer, stillValid, suppressRemoteUpdates, transferState
-
Field Details
-
TEMPLATE_SLOT
public static final int TEMPLATE_SLOT- See Also:
-
BASE_SLOT
public static final int BASE_SLOT- See Also:
-
ADDITIONAL_SLOT
public static final int ADDITIONAL_SLOT- See Also:
-
RESULT_SLOT
public static final int RESULT_SLOT- See Also:
-
TEMPLATE_SLOT_X_PLACEMENT
public static final int TEMPLATE_SLOT_X_PLACEMENT- See Also:
-
BASE_SLOT_X_PLACEMENT
public static final int BASE_SLOT_X_PLACEMENT- See Also:
-
ADDITIONAL_SLOT_X_PLACEMENT
public static final int ADDITIONAL_SLOT_X_PLACEMENT- See Also:
-
RESULT_SLOT_X_PLACEMENT
private static final int RESULT_SLOT_X_PLACEMENT- See Also:
-
SLOT_Y_PLACEMENT
public static final int SLOT_Y_PLACEMENT- See Also:
-
level
-
selectedRecipe
-
recipes
-
-
Constructor Details
-
SmithingMenu
-
SmithingMenu
-
-
Method Details
-
createInputSlotDefinitions
- Specified by:
createInputSlotDefinitions
in classItemCombinerMenu
-
isValidBlock
- Specified by:
isValidBlock
in classItemCombinerMenu
-
mayPickup
- Specified by:
mayPickup
in classItemCombinerMenu
-
onTake
- Specified by:
onTake
in classItemCombinerMenu
-
getRelevantItems
-
createRecipeInput
-
shrinkStackInSlot
private void shrinkStackInSlot(int pIndex) -
createResult
public void createResult()- Specified by:
createResult
in classItemCombinerMenu
-
getSlotToQuickMoveTo
- Overrides:
getSlotToQuickMoveTo
in classItemCombinerMenu
-
findSlotMatchingIngredient
-
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
-
canMoveIntoInputSlots
- Overrides:
canMoveIntoInputSlots
in classItemCombinerMenu
-
findSlotToQuickMoveTo
-