Testfor command problem

Testfor command problem - Worried Women Talking at Home

I need help specifying a testfor command!

As of right now the command is /testfor @e[type=Item,r=4] {Item:{id:minecraft:anvil}}

How can I test this anvil for a damage, enchant, or name tag?






Pictures about "Testfor command problem"

Testfor command problem - Woman Comforting and Supporting Friend
Testfor command problem - A Sad Woman Sitting on Bed Between Women
Testfor command problem - Woman in Black Blazer Standing Beside Woman in Black Blazer



What does the Testfor command do?

You can test for a certain target in the game using the /testfor command in Minecraft. TIP: Starting in Minecraft Java Edition (PC/Mac) 1.13, the /testfor command was removed from the Java Edition version of the game. Let's explore how to use this cheat (game command).

What replaced the Testfor command?

The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.



Comparator Testfor Problem fix




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Karolina Grabowska, Karolina Grabowska, RODNAE Productions, cottonbro