Class RecipeBookTestMenu
java.lang.Object
net.minecraft.world.inventory.AbstractContainerMenu
net.minecraft.world.inventory.RecipeBookMenu
net.neoforged.neoforge.oldtest.recipebook.RecipeBookTestMenu
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.inventory.RecipeBookMenu
RecipeBookMenu.PostPlaceAction
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ContainerLevelAccess
private final RecipeBookExtensionTest.RecipeBookTestContainer
(package private) static final int
(package private) static final int
private static final int
private static final int
private static final int
private boolean
private final Player
(package private) static final int
private final ResultContainer
(package private) final Slot
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
ConstructorsConstructorDescriptionRecipeBookTestMenu
(int id, Inventory inv, FriendlyByteBuf extraData) RecipeBookTestMenu
(int id, Inventory inv, ContainerLevelAccess access) -
Method Summary
Modifier and TypeMethodDescriptionboolean
canTakeItemForPickAll
(ItemStack stack, Slot slot) Called to determine if the current slot is valid for the stack merging (double-click) code.void
handlePlacement
(boolean p_40119_, boolean p_362739_, RecipeHolder<?> rawHolder, ServerLevel serverLevel, Inventory inventory) quickMoveStack
(Player player, int idx) Mostly copied fromCraftingMenu.quickMoveStack(net.minecraft.world.entity.player.Player, int)
void
Called when the container is closed.protected static void
slotChangedCraftingGrid
(AbstractContainerMenu p_150547_, ServerLevel p_379963_, Player p_150549_, RecipeBookExtensionTest.RecipeBookTestContainer p_150550_, ResultContainer p_150551_, @Nullable RecipeHolder<RecipeBookTestRecipe> p_345124_) void
slotsChanged
(Container container) Callback for when the crafting matrix is changed.boolean
stillValid
(Player player) Determines whether supplied player can use this containerMethods 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
-
resultContainer
-
resultSlot
-
access
-
player
-
placingRecipe
private boolean placingRecipe -
RESULT_SLOT
static final int RESULT_SLOT- See Also:
-
CRAFTING_START
static final int CRAFTING_START- See Also:
-
CRAFTING_STOP
static final int CRAFTING_STOP- See Also:
-
INVENTORY_START
private static final int INVENTORY_START- See Also:
-
INVENTORY_STOP
private static final int INVENTORY_STOP- See Also:
-
HOTBAR_START
private static final int HOTBAR_START- See Also:
-
-
Constructor Details
-
RecipeBookTestMenu
-
RecipeBookTestMenu
-
-
Method Details
-
slotChangedCraftingGrid
protected static void slotChangedCraftingGrid(AbstractContainerMenu p_150547_, ServerLevel p_379963_, Player p_150549_, RecipeBookExtensionTest.RecipeBookTestContainer p_150550_, ResultContainer p_150551_, @Nullable @Nullable RecipeHolder<RecipeBookTestRecipe> p_345124_) -
stillValid
Description copied from class:AbstractContainerMenu
Determines whether supplied player can use this container- Specified by:
stillValid
in classAbstractContainerMenu
-
removed
Description copied from class:AbstractContainerMenu
Called when the container is closed.- Overrides:
removed
in classAbstractContainerMenu
-
canTakeItemForPickAll
Description copied from class:AbstractContainerMenu
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
-
slotsChanged
Description copied from class:AbstractContainerMenu
Callback for when the crafting matrix is changed.- Overrides:
slotsChanged
in classAbstractContainerMenu
-
quickMoveStack
Mostly copied fromCraftingMenu.quickMoveStack(net.minecraft.world.entity.player.Player, int)
- Specified by:
quickMoveStack
in classAbstractContainerMenu
-
fillCraftSlotsStackedContents
- Specified by:
fillCraftSlotsStackedContents
in classRecipeBookMenu
-
getGridSlots
-
handlePlacement
public RecipeBookMenu.PostPlaceAction handlePlacement(boolean p_40119_, boolean p_362739_, RecipeHolder<?> rawHolder, ServerLevel serverLevel, Inventory inventory) - Specified by:
handlePlacement
in classRecipeBookMenu
-
getRecipeBookType
- Specified by:
getRecipeBookType
in classRecipeBookMenu
-