Package net.minecraft.recipebook
Class ServerPlaceRecipe<R extends Recipe<?>>
java.lang.Object
net.minecraft.recipebook.ServerPlaceRecipe<R>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceServerPlaceRecipe.CraftingMenuAccess<T extends Recipe<?>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate final intprivate final Inventoryprivate static final intprivate final ServerPlaceRecipe.CraftingMenuAccess<R> private final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateServerPlaceRecipe(ServerPlaceRecipe.CraftingMenuAccess<R> pMenu, Inventory pInventory, boolean pUseMaxItems, int pGridWidth, int pGridHeight, List<Slot> pInputGridSlots, List<Slot> pSlotsToClear) -
Method Summary
Modifier and TypeMethodDescriptionprivate intcalculateAmountToCraft(int pMax, boolean pRecipeMatches) private static intclampToMaxStackSize(int pAmount, List<Holder<Item>> pItems) private voidprivate intprivate intmoveItemToGrid(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 voidplaceRecipe(RecipeHolder<R> pRecipe, StackedItemContents pStackedItemContents) private booleanprivate RecipeBookMenu.PostPlaceActiontryPlaceRecipe(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()
-