or you simply can’t use exclamation marks in NBT tags
This is the case unfortunately. Using !
for negation only works in selectors, and even then only for certain arguments (type
, name
, tag
, team
, m
).
The problem is, that when I move far away from the setup, the redstone stops working, leaving me unable to summon any new fireballs. Instead, I'm trying to use a command block to check when anything except for item is being held;
If I'm understanding correctly, this problem won't be solved by changing your commands if they already do the correct thing when you're near them.
You should instead move your contraption to spawn chunks (which are always loaded) or keep the chunks your contraption is in loaded with a chunk loader.
how I can check for anything except for a specific item?
Your original commands will leave players not holding the item with a score of 0, meaning you can do something like:
/scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}}
/execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]}
/execute @a[score_Fireball_min=0,score_Fireball=0] ~ ~ ~ /say I'm not holding the fireball summon item
/scoreboard players set @a Fireball 0
You can rearrange these commands slightly to have players be left with 0 or 1 at the end of the tick depending on whether they're holding the fireball, if you want:
/scoreboard players set @a Fireball 0
/scoreboard players add @a Fireball 1 {SelectedItem:{tag:{display:{Name:"Summon Fireball"}}}}
/execute @a[score_Fireball_min=1,score_Fireball=1] ~ ~ ~ /summon Fireball ~ ~2.5 ~ {direction:[0.0,0.0,0.0]}
/execute @a[score_Fireball_min=0,score_Fireball=0] ~ ~ ~ /say I'm not holding the fireball summon item
Further, I’ve tried using exclamation marks to set the score of all entities, including the ones with a blank score, but except for the ones with a score of 2 or higher, to 0;
The score_...
argument also unfortunately doesn't accept !
for negation. You'll instead need to do this in multiple steps:
- Add 0 to all scores, turning null scores to 0:
/scoreboard players add @e[type=Arrow] Arrows 0
- Do the command for arrows with
Arrows
score less than 2: @e[score_Arrows=1]
- Do the command for arrows with Arrows score more than 2:
@e[score_Arrows_min=3]
Purchases are specific to your account, not your device. No, you do not need to re-purchase Minecraft PE.
If you switch to another mobile OS like iOS, you will of course need to purchase it again, though.
Best Answer
Minecraft Pocket Edition Vanilla v0.7.1 does not have any commands. You may have seen someone on the PC version, or using a mod such as this one, which adds some commands.