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> menu, Inventory inventory, boolean useMaxItems, int gridWidth, int gridHeight, List<Slot> inputGridSlots, List<Slot> slotsToClear) -
Method Summary
Modifier and TypeMethodDescriptionprivate intcalculateAmountToCraft(int biggestCraftableStack, boolean recipeMatchesPlaced) private static intclampToMaxStackSize(int value, List<Holder<Item>> items) private voidprivate intprivate intmoveItemToGrid(Slot targetSlot, Holder<Item> itemInInventory, int count) static <I extends RecipeInput, R extends Recipe<I>>
RecipeBookMenu.PostPlaceActionplaceRecipe(ServerPlaceRecipe.CraftingMenuAccess<R> menu, int gridWidth, int gridHeight, List<Slot> inputGridSlots, List<Slot> slotsToClear, Inventory inventory, RecipeHolder<R> recipe, boolean useMaxItems, boolean allowDroppingItemsToClear) private voidplaceRecipe(RecipeHolder<R> recipe, StackedItemContents availableItems) private booleanprivate RecipeBookMenu.PostPlaceActiontryPlaceRecipe(RecipeHolder<R> recipe, StackedItemContents availableItems)
-
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> menu, int gridWidth, int gridHeight, List<Slot> inputGridSlots, List<Slot> slotsToClear, Inventory inventory, RecipeHolder<R> recipe, boolean useMaxItems, boolean allowDroppingItemsToClear) -
tryPlaceRecipe
private RecipeBookMenu.PostPlaceAction tryPlaceRecipe(RecipeHolder<R> recipe, StackedItemContents availableItems) -
clearGrid
private void clearGrid() -
placeRecipe
-
clampToMaxStackSize
-
calculateAmountToCraft
private int calculateAmountToCraft(int biggestCraftableStack, boolean recipeMatchesPlaced) -
moveItemToGrid
-
testClearGrid
private boolean testClearGrid() -
getAmountOfFreeSlotsInInventory
private int getAmountOfFreeSlotsInInventory()
-