Package net.minecraft.recipebook
Class ServerPlaceRecipe<R extends Recipe<?>>
java.lang.Object
net.minecraft.recipebook.ServerPlaceRecipe<R>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
ServerPlaceRecipe.CraftingMenuAccess<T extends Recipe<?>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private final int
private final Inventory
private static final int
private final ServerPlaceRecipe.CraftingMenuAccess
<R> private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ServerPlaceRecipe
(ServerPlaceRecipe.CraftingMenuAccess<R> p_363275_, Inventory p_361371_, boolean p_364633_, int p_362980_, int p_361285_, List<Slot> p_364759_, List<Slot> p_361301_) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
calculateAmountToCraft
(int p_364430_, boolean p_362919_) private static int
clampToMaxStackSize
(int p_389711_, List<Holder<Item>> p_389467_) private void
private int
private int
moveItemToGrid
(Slot p_135439_, Holder<Item> p_360762_, int p_346157_) static <I extends RecipeInput,
R extends Recipe<I>>
RecipeBookMenu.PostPlaceActionplaceRecipe
(ServerPlaceRecipe.CraftingMenuAccess<R> p_361341_, int p_361512_, int p_362929_, List<Slot> p_364825_, List<Slot> p_364661_, Inventory p_364618_, RecipeHolder<R> p_363024_, boolean p_360549_, boolean p_361381_) private void
placeRecipe
(RecipeHolder<R> p_364551_, StackedItemContents p_362416_) private boolean
private RecipeBookMenu.PostPlaceAction
tryPlaceRecipe
(RecipeHolder<R> p_362187_, StackedItemContents p_361415_)
-
Field Details
-
ITEM_NOT_FOUND
private static final int ITEM_NOT_FOUND- See Also:
-
inventory
-
useMaxItems
private final boolean useMaxItems -
gridWidth
private final int gridWidth -
gridHeight
private final int gridHeight -
inputGridSlots
-
slotsToClear
-
-
Constructor Details
-
ServerPlaceRecipe
-
-
Method Details
-
placeRecipe
public static <I extends RecipeInput,R extends Recipe<I>> RecipeBookMenu.PostPlaceAction placeRecipe(ServerPlaceRecipe.CraftingMenuAccess<R> p_361341_, int p_361512_, int p_362929_, List<Slot> p_364825_, List<Slot> p_364661_, Inventory p_364618_, RecipeHolder<R> p_363024_, boolean p_360549_, boolean p_361381_) -
tryPlaceRecipe
private RecipeBookMenu.PostPlaceAction tryPlaceRecipe(RecipeHolder<R> p_362187_, StackedItemContents p_361415_) -
clearGrid
private void clearGrid() -
placeRecipe
-
clampToMaxStackSize
-
calculateAmountToCraft
private int calculateAmountToCraft(int p_364430_, boolean p_362919_) -
moveItemToGrid
-
testClearGrid
private boolean testClearGrid() -
getAmountOfFreeSlotsInInventory
private int getAmountOfFreeSlotsInInventory()
-