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> pMenu, Inventory pInventory, boolean pUseMaxItems, int pGridWidth, int pGridHeight, List<Slot> pInputGridSlots, List<Slot> pSlotsToClear) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
calculateAmountToCraft
(int pMax, boolean pRecipeMatches) private static int
clampToMaxStackSize
(int pAmount, List<Holder<Item>> pItems) private void
private int
private int
moveItemToGrid
(Slot pSlot, Holder<Item> pItem, int pCount) static <I extends RecipeInput,
R extends Recipe<I>>
RecipeBookMenu.PostPlaceActionplaceRecipe
(ServerPlaceRecipe.CraftingMenuAccess<R> pMenu, int pGridWidth, int pGridHeight, List<Slot> pInputGridSlots, List<Slot> pSlotsToClear, Inventory pInventory, RecipeHolder<R> pRecipe, boolean pUseMaxItems, boolean pIsCreative) private void
placeRecipe
(RecipeHolder<R> pRecipe, StackedItemContents pStackedItemContents) private boolean
private RecipeBookMenu.PostPlaceAction
tryPlaceRecipe
(RecipeHolder<R> pRecipe, StackedItemContents pStackedItemContents)
-
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> pMenu, int pGridWidth, int pGridHeight, List<Slot> pInputGridSlots, List<Slot> pSlotsToClear, Inventory pInventory, RecipeHolder<R> pRecipe, boolean pUseMaxItems, boolean pIsCreative) -
tryPlaceRecipe
private RecipeBookMenu.PostPlaceAction tryPlaceRecipe(RecipeHolder<R> pRecipe, StackedItemContents pStackedItemContents) -
clearGrid
private void clearGrid() -
placeRecipe
-
clampToMaxStackSize
-
calculateAmountToCraft
private int calculateAmountToCraft(int pMax, boolean pRecipeMatches) -
moveItemToGrid
-
testClearGrid
private boolean testClearGrid() -
getAmountOfFreeSlotsInInventory
private int getAmountOfFreeSlotsInInventory()
-