Untouchable items

Untouchable items - Free stock photo of antique, art, culture

I am running a command, but I want to use it for only items that aren't a few. Is there a way to make an entity untouchable by commands?



Best Answer

Ok. I figured it out. You should use a tag

scoreboard players tag @e[put whatever you want here] add example

That would add a tag to any item you want. Then, you do your buisness, while adding "tag=!example" in selector. For instance:

tp @e[tag=!example] ~ ~20 ~

or

entitydata @e[tag=!example] {CustomName:"I am touched by the command"}

In this case, "example" is the name of a tag. You don't need to do anything else to make it work. You just add any tag you want to any entity with the first command, and it's all set to be added to selectors.

And, to answer the initial question, no, it's impossible to make entity completely ntouchable by any commands. The only 2 solutions are:

  • Killing the entity
  • Using additional selector modifications, like tags, radius, number, e.t.c



Pictures about "Untouchable items"

Untouchable items - Free stock photo of adult, bowl, coffee
Untouchable items - Free stock photo of antique, beer, brass
Untouchable items - Assorted-color Bricks





Music AutOmatiK - Untouchable Things




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

Images: ANTONI SHKRABA, ANTONI SHKRABA, Alexander Zvir, Sharon McCutcheon