Mojira Archive
MC-276478

Using an item with the max_damage component does not reduce its damage, and problems in implementing this through use_remainder

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.

Invalid

KIPO4

2024-09-07, 09:46 AM

2024-09-11, 02:53 PM

2024-09-08, 05:17 PM

0

1

Unconfirmed

(Unassigned)

24w36a

-