Minecraft – Executing on an entity is not working

minecraft-commandsminecraft-java-edition

When I put in this command in a command block:

/scoreboard players set @e[type=Item] PigProgress 1 {Item:{id:319}}

It says:

The dataTag does not match for c97c9605-6b59-44e8-bf24-aa2e46c9c746

Does anyone know why? The entity is a porkchop item.

Best Answer

There are a few things that might cause this.

You are on 1.8

You are on 1.8. This is probably what your problem is. As of 1.8 you cannot use number ids for items. You instead need to use minecraft:(name). Instead of

{Item:{id:319}} 

Try

{Item:{id:minecraft:porkchop}}

It just isn't detecting the right item

Your command block will output this if it finds an item on the ground which isn't a porkchop. This will not affect the usefullness of the command, and it will still work. Which is why it still will output this even after it is fixed, if it detects an item other than a porkchop on the ground, but it doesn't matter because the scoreboard command will still work.