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 Merchant
private final Player
private int
private final MerchantContainer
-
Constructor Summary
ConstructorsConstructorDescriptionMerchantResultSlot
(Player pPlayer, Merchant pMerchant, MerchantContainer pSlots, int pSlot, int pXPosition, int pYPosition) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
checkTakeAchievements
(ItemStack pStack) boolean
Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.protected void
onQuickCraft
(ItemStack pStack, int pAmount) Typically increases an internal count, then callsonCrafting(item)
.void
remove
(int pAmount) Decrease the size of the stack in slot (first int arg) by the amount of the second int arg.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 pPlayer, Merchant pMerchant, MerchantContainer pSlots, int pSlot, int pXPosition, int pYPosition)
-
-
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 slot (first int arg) by the amount of the second int arg. Returns the new stack. -
onQuickCraft
Typically increases an internal count, then callsonCrafting(item)
.- Overrides:
onQuickCraft
in classSlot
- Parameters:
pStack
- the output - ie, iron ingots, and pickaxes, not ore and wood.
-
checkTakeAchievements
- Overrides:
checkTakeAchievements
in classSlot
- Parameters:
pStack
- the output - ie, iron ingots, and pickaxes, not ore and wood.
-
onTake
-