mojira.dev
MCPE-138304

Items Losing Tag Data

How I discovered the issue:
I was trying to create a system that counted how many blocks are farmed by players throughout the play-through of a map. My idea for this system was simple, when a block is broken, tag the entity form of the block before it is picked up, then add 1 to the scoreboard. That way, it's considered different from other entities and therefore, players can't just drop the item to increase the score value. However, when the item is picked up, it appears that any tags that were applied to the item are gone.

How the system would have worked:
Repeat Command Block | Unconditional | Always Active
/execute @e[type=item,name="Oak Log"] ~ ~ ~ tag @e[type=item,name="Oak Log",r=1] add countedoaklog

  • This basically executes a command for all broken oak logs to apply a tag to them called "countedoaklog" so it is considered different from other oak log entities.

Chain Command Block | Conditional | Always Active
/scoreboard players add "logs" Resources 1

  • This basically would add 1 into the scoreboard if the tag was applied. "logs" is not a username and is instead a randomly added placeholder or "player".

Steps to reproduce:

  1. Drop any item into the world.

  2. Execute a command to tag the item.

  3. Pick the item up.
    All added tags are removed.
    You can test this by dropping the item again and trying to kill all entities with the tag you added.

I was not sure if this is considered a "bug" or an intended feature. If I could receive clarification on this, it would be much helpful and if you could provide a solution to my problem, I'd be more than grateful.

Comments 3

Technically the item entity doesn't have anything to do with the item itself, when you pick up the item the entity with the tag will despawn and you'll be given the corresponding item.

You're not tagging the item, only the entity containing the item if that makes sense.

To do what you want to do would require the use of a behaviour pack from an addon as I don't know of anyway that system could work with just commands;

  • From the players behaviour file run an environment test to check when the player is holding a certain item (oak log in your case)

  • When it's triggered, run an event to replace each log with a custom log and add 1 to the scoreboard

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Is this still an issue in the latest version? If yes, can you please add it to the affected versions (or mention it if you are not the reporter)?

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.

For any account or purchasing related issues, please contact Minecraft Customer Support directly, as we cannot assist with those here at the bug tracker.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

xSnipez3

(Unassigned)

Unconfirmed

Xbox

Xbox One S

1.17.11 Hotfix

Retrieved