1

I have a command, what sets the score of an item entity dropped by a mob.

/scoreboard players set @e TMNextStage 1 {Item:{id:"minecraft:flint",Count:1b,tag:{display:{Name:"TMNextStage"}}}}

What is the 1.13+ version of this command? I couldn't find anything about targeting the right item. Thanks for the answers in advance!

1

It's directly in selector arguments now. So you could use this:

scoreboard players set @e[nbt={Item:{id:"minecraft:flint",Count:1b,tag:{display:{Name:"TMNextStage"}}}}] TMNextStage 1

But you could also directly do things for them, for example like this:

tp @e[nbt={Item:{id:"minecraft:flint",Count:1b,tag:{display:{Name:"TMNextStage"}}}}] @s

Also, if you add type=item to the selector, performance improves, because Minecraft doesn't need to check the NBT of every entity.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.