1

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?

3
  • What do you mean by untouchable?
    – Moddl
    Commented Jun 5, 2016 at 19:37
  • make their NBT tags un-modifiable by commands @ModDL
    – David
    Commented Jun 5, 2016 at 19:53
  • It's impossible. Commented Jun 7, 2016 at 2:48

1 Answer 1

1

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
3
  • Im kinda confused. Could you please expand on what "example" is
    – David
    Commented Jun 5, 2016 at 19:31
  • 1
    This doesn't fulfill the desired action. Untouchable appears to mean the NBT data can't be modified, and this can also be touched by a normal command.
    – user140963
    Commented Jun 5, 2016 at 19:56
  • 2
    Affiliation to what?
    – user11502
    Commented Jun 12, 2016 at 23:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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