When I use an item, it simply disappears and does not lose its durability. This applies to all items that can be used.
Command example:
```
/give @p minecraft:cooked_salmon[minecraft:max_damage=5,minecraft:max_stack_size=1,minecraft:damage=1]
```
where `minecraft:damage=1`, it was visually visible that the item has a durability.
There is a component "use_remainder" that replaces the item with another one after use, and you can make a chain and increase damage by 1 for each next one. Here is an example of a command that works: (command #1 from the file)
However, there are some disadvantages to such a command:
1) The durability is only 5, and what if you need 200? 1000? (At the end of the file, there is a command for 200 durability of the snowball.)
2) If you try to change the name of the item or add enchantments after using the item, there will be a new item that will not have changes to the previous item.
Additionally, with some situations/items, when using an item with use_remainder, the item disappears and is not replaced by an item from use_remainder:
Bow/crossbow shooting leads to the complete loss of the throwing object (arrows, fireworks rockets).
Using fireworks rockets on a block (using when flying on elytra works great).
Totem of undying.
Using spawn egg.
The same thing happens, but I'm not sure what it should be:Placing a block.
Crafting.
Something similar: [MC-271373]
P.S. Translated using a translator and more accurately corrected errors with AI.
Attachments
Comments 4
That is, if an item has durability, but it is not used when using the item, is it not a bug?
And the fact that the "use_reminder" component should work when changing the stack of an item is also not an bug? That is, for example, when a bow uses an arrow, it does not change the stack of the item?
https://www.minecraft.net/en-us/article/minecraft-snapshot-24w34a :
MINECRAFT:USE_REMAINDER
If present, will replace the item with a remainder item if its stack count has decreased after use
- If the item has a stack count higher than 0 after use, the remainder item will be added to the inventory instead
- If the inventory is full when trying to add a remainder item to it, it will be dropped on the ground insteadFormat: single value as an item stack
- e.g. use_remainder={id:'minecraft:stick', count:1}
Or does my translator incorrectly translate "If present, will replace the item with a remaining item if its stack count has decreased after use" and I do not understand the meaning correctly?
The part of the changelog you are referencing does not mention anything about damageable items or durability; it simply says that when an item from a stack is used up, it will be replaced by the specified remainder.
Thank you for your report!
However, this issue is Invalid.
You have posted a feature request or a suggestion. This site is for bug reports only.
For suggestions, please visit The Minecraft Feedback Site or visit the Minecraft Feedback Discord server.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki