Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-269813

Item count in villager trade offers is restricted to standard max stack sizes by default

XMLWordPrintable

    • Community Consensus
    • Commands, Trading
    • Low
    • Platform

      When attempting to create a villager with a trade offer that either buys or sells an item with a max stack size above the default allowed size, the trades will not function as expected, being restricted down to the default values.

      Steps to Reproduce:

      1. Summon these villagerss
        /summon minecraft:villager ~ ~ ~ {VillagerData:{profession:"minecraft:cleric", level:5}, Offers:{Recipes:[{maxUses:100, sell:{count:99, id:"minecraft:emerald"}, buy:{count:99, id:"minecraft:diamond_sword"}}]}}
        
        /summon minecraft:villager ~ ~ ~ {VillagerData:{profession:"minecraft:cleric", level:5}, Offers:{Recipes:[{maxUses:100, sell:{count:99, id:"minecraft:diamond_sword"}, buy:{count:99, id:"minecraft:emerald"}}]}}
        
      2. Open their respective trading UI's

      Observed & Expected Results:

      - The item the villager is buying will properly show the expected value of 99 for the item, but will be discounted down to the default max size of 64, despite the item not actually being 'discounted'. The item that the villager is selling will simpy be restricted down to the default max stack size. (one for 'non-stackables', and 64 for most items, etc)
      - The villager would require the the player have the proper amount of items to buy (not at a discounted price), and be rewarded with the intended amount.

      Screenshots/Videos:

      VillagersMax.mp4

      Notes:

      1. This behavior could be intentional based off of the 'fixed' command in the pinned comment.
      2. Related to MC-269700 MC-269684

            Unassigned Unassigned
            Jingy [Helper] Jiingy
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: