Package net.minecraft.world.inventory
Class MerchantResultSlot
java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraft.world.inventory.MerchantResultSlot
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Merchantprivate final Playerprivate intprivate final MerchantContainer -
Constructor Summary
ConstructorsConstructorDescriptionMerchantResultSlot(Player player, Merchant merchant, MerchantContainer slots, int slot, int x, int y) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckTakeAchievements(ItemStack stack) booleanCheck if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.protected voidonQuickCraft(ItemStack stack, int amount) Typically increases an internal count, then callscheckTakeAchievements(item).voidremove(int amount) Decrease the size of the stack in the slot by the amount specified.Methods inherited from class net.minecraft.world.inventory.Slot
allowModification, getContainerSlot, getItem, getMaxStackSize, getMaxStackSize, getNoItemIcon, getSlotIndex, hasItem, isActive, isFake, isHighlightable, isSameInventory, mayPickup, onQuickCraft, onSwapCraft, safeInsert, safeInsert, safeTake, set, setBackground, setByPlayer, setByPlayer, setChanged, tryRemove
-
Field Details
-
slots
-
player
-
removeCount
private int removeCount -
merchant
-
-
Constructor Details
-
MerchantResultSlot
public MerchantResultSlot(Player player, Merchant merchant, MerchantContainer slots, int slot, int x, int y)
-
-
Method Details
-
mayPlace
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel. -
remove
Decrease the size of the stack in the slot by the amount specified. Returns the new stack. -
onQuickCraft
Typically increases an internal count, then callscheckTakeAchievements(item).- Overrides:
onQuickCraftin classSlot- Parameters:
stack- the output - i.e., iron ingots, and pickaxes, not ore and wood.
-
checkTakeAchievements
- Overrides:
checkTakeAchievementsin classSlot- Parameters:
stack- the output - i.e., iron ingots, and pickaxes, not ore and wood.
-
onTake
-