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 intstatic final intprivate final RecipePropertySetstatic final intstatic final intprivate final RecipePropertySetprivate final DataSlotprivate final Levelstatic final intprivate static final intstatic final intstatic final intstatic final intprivate final RecipePropertySetFields inherited from class ItemCombinerMenu
access, inputSlots, player, resultSlots -
Constructor Summary
ConstructorsModifierConstructorDescriptionSmithingMenu(int containerId, Inventory inventory) SmithingMenu(int containerId, Inventory inventory, ContainerLevelAccess access) privateSmithingMenu(int containerId, Inventory inventory, ContainerLevelAccess access, Level level) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanMoveIntoInputSlots(ItemStack stack) booleancanTakeItemForPickAll(ItemStack carried, Slot target) Called to determine if the current slot is valid for the stack merging (double-click) code.private static ItemCombinerMenuSlotDefinitioncreateInputSlotDefinitions(RecipeAccess recipes) private SmithingRecipeInputvoidbooleanprotected booleanisValidBlock(BlockState state) protected voidprivate voidshrinkStackInSlot(int slot) voidslotsChanged(Container container) Callback for when the crafting matrix is changed.Methods inherited from class ItemCombinerMenu
getResultSlot, mayPickup, quickMoveStack, removed, stillValidMethods inherited from class 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
-
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
-
baseItemTest
-
templateItemTest
-
additionItemTest
-
hasRecipeError
-
-
Constructor Details
-
SmithingMenu
-
SmithingMenu
-
SmithingMenu
private SmithingMenu(int containerId, Inventory inventory, ContainerLevelAccess access, Level level)
-
-
Method Details
-
createInputSlotDefinitions
-
isValidBlock
- Specified by:
isValidBlockin classItemCombinerMenu
-
onTake
- Specified by:
onTakein classItemCombinerMenu
-
getRelevantItems
-
createRecipeInput
-
shrinkStackInSlot
private void shrinkStackInSlot(int slot) -
slotsChanged
Description copied from class:ItemCombinerMenuCallback for when the crafting matrix is changed.- Overrides:
slotsChangedin classItemCombinerMenu
-
createResult
public void createResult()- Specified by:
createResultin classItemCombinerMenu
-
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:
canTakeItemForPickAllin classAbstractContainerMenu
-
canMoveIntoInputSlots
- Overrides:
canMoveIntoInputSlotsin classItemCombinerMenu
-
hasRecipeError
public boolean hasRecipeError()
-