Class ResultSlot
java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraft.world.inventory.ResultSlot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CraftingContainerprivate final Playerprivate int -
Constructor Summary
ConstructorsConstructorDescriptionResultSlot(Player player, CraftingContainer craftSlots, Container container, int id, int x, int y) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckTakeAchievements(ItemStack carried) private static NonNullList<ItemStack> copyAllInputItems(CraftingInput input) private NonNullList<ItemStack> getRemainingItems(CraftingInput input, Level level) booleanisFake()booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.protected voidonQuickCraft(ItemStack picked, int count) Typically increases an internal count, then callsonCrafting(item).protected voidonSwapCraft(int count) voidremove(int amount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.Methods inherited from class Slot
allowModification, getContainerSlot, getItem, getMaxStackSize, getMaxStackSize, getNoItemIcon, getSlotIndex, hasItem, isActive, isHighlightable, isSameInventory, mayPickup, onQuickCraft, safeInsert, safeInsert, safeTake, set, setBackground, setByPlayer, setByPlayer, setChanged, tryRemove
-
Field Details
-
craftSlots
-
player
-
removeCount
private int removeCount
-
-
Constructor Details
-
ResultSlot
public ResultSlot(Player player, CraftingContainer craftSlots, Container container, int id, int x, int y)
-
-
Method Details
-
mayPlace
-
remove
-
onQuickCraft
Typically increases an internal count, then callsonCrafting(item).- Overrides:
onQuickCraftin classSlot- Parameters:
picked- the output - ie, iron ingots, and pickaxes, not ore and wood.
-
onSwapCraft
protected void onSwapCraft(int count) - Overrides:
onSwapCraftin classSlot
-
checkTakeAchievements
- Overrides:
checkTakeAchievementsin classSlot- Parameters:
carried- the output - ie, iron ingots, and pickaxes, not ore and wood.
-
copyAllInputItems
-
getRemainingItems
-
onTake
-
isFake
-