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 somecontrol 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)
Comments 7
I believe that the powdered snow bucket with [!use_remainder] when used still yields a bucket is a separate bug since that's a mishap for forgetting these past items are "used". It also affects buckets of axolotl, cod, lava, milk, pufferfish, salmon, tadpole, tropical fish, and water.
MC-276777, MC-276619, and MC-276783 are all included in this issue, and MC-276783 describes the same issue as MC-276619, which shows to be "Invalid" since it is a "Feature Request", so maybe durability-related items or items with durability(damage) NBTs(described in MC-276478) are supposed to not yield an item after 'use_remainder' is toggled?
Thank you for your report!
However, this issue is Invalid.
Please put only one bug report in each ticket. It is very difficult to keep track of bugs when they are not in their own tickets.
However, please review the Bug Tracker Guidelines before creating new reports. Be sure to search for an existing issue as it is likely to have already been reported.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
Respectfully, I disagree with the assessment that this is a feature request as I am simply reporting that "use_remainder" does not work as explicitly described in the changelog of 24w35a:
MINECRAFT:USE_REMAINDER
:
If present, will replace the item with a remainder item if its stack count has decreased after use
All of these behaviours that do not result in a remainder item meet both requirements of being used and decreasing the item's stack count, thus its a bug.
A feature request would be "use_remainder should accept loot tables and/or item modifiers", or "rename use_remainder and revert it back to a subcomponent of consumable as that better reflects it's actual trigger conditions in-game."
I also don't agree that each instance of the component not working as expected on different items are individual bugs that should be reported separately, nor that this is what I was doing. I was only providing examples designed to demonstrate exactly how "use_remainder" either does not work correctly, or consistently across the board.
The different cases you described here might get different resolutions (e.g. MC-276619), splitting them up means it's more likely that the individual ones will be triaged and fixed. A lot of those come down to behavior of specific items, so a general "it's inconsistent" isn't enough to have them known and addressed
there is no confusion.
"use" within the context of minecraft is pretty cut and dry.
every one of these examples should count as a "use" because they do so throughout the rest of the game on both a surface and technical level already. as I said in the report; you can verify each example in the statistics screen under "times used", or via a scoreboard tracking the objective minecraft.used:minecraft.<item>, or with the 'item_used_on_block' or 'using_item' advancement criteria.
the word "use" comes up in all of those, and the only thing it's seemingly inconsistent with is the "use_remainder" item component.
hence this post
updated formatting