Class MerchantResultSlot

java.lang.Object
net.minecraft.world.inventory.Slot
net.minecraft.world.inventory.MerchantResultSlot

public class MerchantResultSlot extends Slot
  • Field Details

    • slots

      private final MerchantContainer slots
    • player

      private final Player player
    • removeCount

      private int removeCount
    • merchant

      private final Merchant merchant
  • Constructor Details

    • MerchantResultSlot

      public MerchantResultSlot(Player pPlayer, Merchant pMerchant, MerchantContainer pSlots, int pSlot, int pXPosition, int pYPosition)
  • Method Details

    • mayPlace

      public boolean mayPlace(ItemStack pStack)
      Check if the stack is allowed to be placed in this slot, used for armor slots as well as furnace fuel.
      Overrides:
      mayPlace in class Slot
    • remove

      public ItemStack remove(int pAmount)
      Decrease the size of the stack in slot (first int arg) by the amount of the second int arg. Returns the new stack.
      Overrides:
      remove in class Slot
    • onQuickCraft

      protected void onQuickCraft(ItemStack pStack, int pAmount)
      Typically increases an internal count, then calls onCrafting(item).
      Overrides:
      onQuickCraft in class Slot
      Parameters:
      pStack - the output - ie, iron ingots, and pickaxes, not ore and wood.
    • checkTakeAchievements

      protected void checkTakeAchievements(ItemStack pStack)
      Overrides:
      checkTakeAchievements in class Slot
      Parameters:
      pStack - the output - ie, iron ingots, and pickaxes, not ore and wood.
    • onTake

      public void onTake(Player pPlayer, ItemStack pStack)
      Overrides:
      onTake in class Slot