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

Component 'use_remainder' doesn't affect most items correctly

XMLWordPrintable

    • Unconfirmed
    • (Unassigned)

       

      MINECRAFT:USE_REMAINDER:

      If present, will replace the item with a remainder item if its stack count has decreased after use

      This does not work for when blocks/bucketed materials/entities are placed by the player, or when tools/items are used - even when destroyed after use.

      All of those actions are considered "using" the item by the game's statistics - verifiable with 'item_used_on_block' or 'using_item' advancement triggers, or via a custom scoreboard display (/scoreboard objectives add test minecraft.used:minecraft.stone_axe).

       

      TO RECREATE THE ISSUE...

      Here are some control items that work as expected:

      • {{/give @s water_bucket}}
        (a vanilla water bucket that yields a bucket when placed in survival mode)
      • {{{}/give @s snowball[use_remainder=\{id:'bone', count:1}]
        {}}}(a snowball that yields a bone when thrown in survival mode)
      • {{/give @s mushroom_stew[!use_remainder]}}
        (a mushroom stew with the component removed - no longer yields a bowl when consumed in survival mode)

      ...some test items that do NOT work as expected:

      • {{{}/give @s stone_axe[damage=59, use_remainder=\{id:'stick', count:1}]
        {}}}(an axe that should yield a stick when broken, but doesn't)
      • /give @s vault[use_remainder=\{id:'trial_key'}]
        (a vault that should yield a key when placed, but doesn't)
      • {{/give @s powder_snow_bucket[!use_remainder]}}
        (a powder snow bucket with the component removed - should not yield a bucket when placed, but still does)

      and some that only half-work in specific circumstances:

      • /give @s leather_boots[minecraft:use_remainder={{{} {id:'coal'}

        ]{}}}
        (boots that yield coal when equipped to the player via right-click in survival mode, but not when equipped to an armor stand)

      • /give @s potato[minecraft:use_remainder=\{id:'poisonous_potato'}] 64
        (potatoes that yields a poisonous potato when eaten, or fed to a pig in survival mode, but not when composted or planted on farmland)
      • /give @s totem_of_undying[consumable={}, use_remainder=\{id:'emerald', count:2}]
        (a totem that yields emeralds when eaten in survival, but not when triggered via 'death protection')

       

      Also, tangentially related; water_bucket, lava_bucket and powder_snow_bucket items are hardcoded to convert into regular buckets (overriding any and all component data in the stack - including 'count', resulting in item deletion).
      They should instead simply have the component: '[minecraft:use_remainder=\{id:'minecraft:bucket', count:1}]'
      (provided this issue with the component is fixed first, of course)

            Unassigned Unassigned
            iBunny iBunny
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: