Output reads "The entity UUID is in an invalid format". I do realize that "snowball" is capitalized in one command and not in the other but don't have enough of a grasp on commands to know why.
Any help on how to solve this would be greatly appreciated, Thanks.
this will count up by 1 every time someone throws a snowball. Now you need to give the snowball to the player. To do this use pseudo NBT:
/give @p snowball 1 0 {FireSpell:1}
This will give you a snowball with the pseudo NBT data of "FireSpell" set to 1. Now you are able to track which snowball the player uses. To track this, tag the player using a scoreboard tag when they hold the snowball with that NBT data in either the main hand or offhand. Now you need to execute at all players with that tag and a score of throwSnowball of 1 to summon the fireball at the closest snowball. Then reset the players throwSnowball score.
I have a video on how to use pseudo NBT, which can be found here:
Ok, I think I set it up right but I only get a plain snowball, not a FireSpell snowball. It behaves like a normal snowball when I throw it and the repeating CB output is "Entity didn't have the holdingFireSpell tag". I will keep investigating to see if I can figure it out.
copy the commands exactly as I wrote them. Do not rely on the repeating command block's output. It isn't clearing the tag because you didn't have it to begin with. You need to place the commands in the exact order I put them in. Then run the give command I left. It will not have the colored name like in the gif I linked. The colored name has nothing to do with the mechanic, and I only added it to visually show that the two snowballs had different NBT
My fault, I made the chains conditional, all fixed now, thanks very much!!
Now, is there a way to have the same snowball do different amounts of damage depending on the level of the player throwing it? ExplosionPower:1 for lower class, ExplosionPower:3 for mid class and ExplosionPower:5 for high class? I'm guessing I would add a couple of extra chain blocks with modified objectives? Like this?
if the user only has one of the snowballs then it breaks. This is because the game sees that you have thrown the snowball and it is no longer in your hand. so the scoreboard tag is not given, due to that. The user would need at least 2 in the slot.
This is a limitation in the game itself, not much can be done.
Ok, that can work as a bit of a control to prevent spamming some poor zombie with fireballs. Is there any way to actually control this i.e. give the players one snowball at a time until they have 2 and then monitor their inventory every 15 seconds or so see if this is true, if not they get 2 more? (please say "Yes! Of course! You can do this...)
if the user only has one of the snowballs then it breaks. This is because the game sees that you have thrown the snowball and it is no longer in your hand. so the scoreboard tag is not given, due to that. The user would need at least 2 in the slot.
This is a limitation in the game itself, not much can be done.
This is not true. You are testing their slot in the same tick they throw it. Move the first three commands to the end of the chain and it will test against the item they were holding last tick, completely fixing the issue.
As for making the explosion radius bigger depending on level, use the target selector arguments "l" and "lm", these stand for level max and level min respectively. So your first command would look like this instead:
As for making the explosion radius bigger depending on level, use the target selector arguments "l" and "lm", these stand for level max and level min respectively. So your first command would look like this instead:
you are assuming he is using the EXP bar and EXP level which may not be the case at all. The commands he had worked fine.
When I added the extra command blocks in the chain for the extra levels it seemed like the snowball was exploding in my hand (I took damage) and then the fireball would fly off in a long arc instead of a straight line still only using one snowball. The arc is weird because I thought fireballs weren't affected by gravity. Anyways I figured that the extra command blocks in the chain may be causing the premature/double explosion so I made a separate chain for each level progression and that seemed to fix it, but here's the "sort of". Level 5 fireball works, level 10 fireball works, but when I go to level 15 it's just a snowball. Here's the commands.
LVL 6-10 - makes fireballs
scoreboard players tag @a remove holdingFireSpell
scoreboard players tag @a add holdingFireSpell {SelectedItem:{tag:{FireSpell:1}}}
scoreboard players tag @a add holdingFireSpell {Inventory:[{Slot:-106b,tag:{FireSpell:1}}]}
I thought it would be something simple like spelling but I copied and pasted the commands from the working code twice and have rebuilt the CB chain three times trying to make it work. I guess it could be something in the scoreboard but the lvl reads 15 and no fireball. I reduce my lvl to 10 and the fireball works.
On a side note, any ideas about maintaining a 2 snowball limit in the hotbar?
Ok, redid all the chains and it now works for all levels (two HUGE thumbs up!!) but I still need 2 snowballs in the hotbar to cast the spell while in GM2. I can live with that but are you sure this isn't the case with you?
Yup, I completely removed the old system and made 5 new CB chains, one for each increase in lvl, and copied and pasted your commands in the order you presented them (which included the improvement by nigathan) but I only get a snowball when i get down to the last one. Fireballs work for all levels but not with a single snowball.
Also it seems that killing a mob with a fireball doesn't register with your stats as a kill. That's a problem as my leveling system is based off of the mob kill stats. Is there a way to fix this? Killing a Ghast with their own fireball must count as a kill, maybe there is a way to register all fireball kills in this manner?
the reason it does not count as a kill is because you did not kill the entity. Even killing a ghast with it's own fireball, you did not kill it. The fireball killed it. It wouldn't even make sense logically. You throw a snowball and so a new entity is spawned, the fireball, which is then hit by the snowball. The fireball has no interaction at all with the player, so how would the stat even know who killed it.
the mobKills stat only tracks players who deal the killing blow. You will need to design your own system for tracking this, or handle levels differently. One solution would be to give every player an ID score, and set the fireballs score to the same value when summoned. Now you know which fireball belongs to whom. How you proceed from there is dependent on the design and needs of your project.
a similar issue can be found with the damageDealt stat. It only tracks player-to-entity attack damage. So hitting an entity with an arrow does not count towards the score, even though logically the player dealt the damage. However internally it was the arrow, not the player.
Is there any way how you could make a command plug-in that would allow a player to throw a fireball in MCPE. IveI tried your commands but they haven't worked because of how the command wasn't found.
I am trying to create a class-specific Fireball spell in 1.9.4. I have the traditional snowball method-
/execute @e[type=Snowball] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:5}
and would like to be able to grant it via a "special" snowball with the scoreboard. I tried this-
/give @a[team=team_mage,score_lvl_min=5,score_lvl=9] snowball 1 1 {display:{Name:"Fireball"}
which "works" but my snowball has the missing texture texture when in inventory but a proper snowball texture when thrown.
Also it fails to produce a Fireball when incorporated into the command like this-
/execute @e[type=snowball 1 1 {display:{Name:"Fireball"}] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:5}
Output reads "The entity UUID is in an invalid format". I do realize that "snowball" is capitalized in one command and not in the other but don't have enough of a grasp on commands to know why.
Any help on how to solve this would be greatly appreciated, Thanks.
You cannot use NBT data in target selectors, it simply isn't possible. You can, however, create what you want to do.
First of all you will need one scoreboard objective.
this will count up by 1 every time someone throws a snowball. Now you need to give the snowball to the player. To do this use pseudo NBT:
This will give you a snowball with the pseudo NBT data of "FireSpell" set to 1. Now you are able to track which snowball the player uses. To track this, tag the player using a scoreboard tag when they hold the snowball with that NBT data in either the main hand or offhand. Now you need to execute at all players with that tag and a score of throwSnowball of 1 to summon the fireball at the closest snowball. Then reset the players throwSnowball score.
I have a video on how to use pseudo NBT, which can be found here:
FULL COMMANDS:
Now when you throw that specific snowball, it will summon the fireball. All other snowballs will work as normal.
Ok, I think I set it up right but I only get a plain snowball, not a FireSpell snowball. It behaves like a normal snowball when I throw it and the repeating CB output is "Entity didn't have the holdingFireSpell tag". I will keep investigating to see if I can figure it out.
copy the commands exactly as I wrote them. Do not rely on the repeating command block's output. It isn't clearing the tag because you didn't have it to begin with. You need to place the commands in the exact order I put them in. Then run the give command I left. It will not have the colored name like in the gif I linked. The colored name has nothing to do with the mechanic, and I only added it to visually show that the two snowballs had different NBT
My fault, I made the chains conditional, all fixed now, thanks very much!!
Now, is there a way to have the same snowball do different amounts of damage depending on the level of the player throwing it? ExplosionPower:1 for lower class, ExplosionPower:3 for mid class and ExplosionPower:5 for high class? I'm guessing I would add a couple of extra chain blocks with modified objectives? Like this?
execute @a[team=team_mage,score_lvl_min=5,score_lvl=9,score_throwSnowball_min=1,tag=holdingFireSpell] ~ ~ ~ execute @e[type=Snowball,c=1] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:1}
execute @a[team=team_mage,score_lvl_min=10,score_lvl=14,score_throwSnowball_min=1,tag=holdingFireSpell] ~ ~ ~ execute @e[type=Snowball,c=1] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:3}
execute @a[team=team_mage,score_lvl_min=15,score_lvl=19,score_throwSnowball_min=1,tag=holdingFireSpell] ~ ~ ~ execute @e[type=Snowball,c=1] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:5}
Exactly. Same basic command but with additional arguments in the player selector. Those commands look like they should work just fine.
Hmmm, is there any reason this would stop working when I go from gamemode 1 to gamemode 2? Because it does.
if the user only has one of the snowballs then it breaks. This is because the game sees that you have thrown the snowball and it is no longer in your hand. so the scoreboard tag is not given, due to that. The user would need at least 2 in the slot.
This is a limitation in the game itself, not much can be done.
Ok, that can work as a bit of a control to prevent spamming some poor zombie with fireballs. Is there any way to actually control this i.e. give the players one snowball at a time until they have 2 and then monitor their inventory every 15 seconds or so see if this is true, if not they get 2 more? (please say "Yes! Of course! You can do this...)
This is not true. You are testing their slot in the same tick they throw it. Move the first three commands to the end of the chain and it will test against the item they were holding last tick, completely fixing the issue.
As for making the explosion radius bigger depending on level, use the target selector arguments "l" and "lm", these stand for level max and level min respectively. So your first command would look like this instead:
/execute @a[team=team_mage,lm=5,l=9,score_throwSnowball_min=1,tag=holdingFireSpell] ~ ~ ~ execute @e[type=Snowball,c=1] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:1}
But you may want to simply remove the "lm=5" from this incase they are level 1 or something.
you are assuming he is using the EXP bar and EXP level which may not be the case at all. The commands he had worked fine.
They are (sort of) working fine.
When I added the extra command blocks in the chain for the extra levels it seemed like the snowball was exploding in my hand (I took damage) and then the fireball would fly off in a long arc instead of a straight line still only using one snowball. The arc is weird because I thought fireballs weren't affected by gravity. Anyways I figured that the extra command blocks in the chain may be causing the premature/double explosion so I made a separate chain for each level progression and that seemed to fix it, but here's the "sort of". Level 5 fireball works, level 10 fireball works, but when I go to level 15 it's just a snowball. Here's the commands.
LVL 6-10 - makes fireballs
scoreboard players tag @a remove holdingFireSpell
scoreboard players tag @a add holdingFireSpell {SelectedItem:{tag:{FireSpell:1}}}
scoreboard players tag @a add holdingFireSpell {Inventory:[{Slot:-106b,tag:{FireSpell:1}}]}
execute @a[team=team_mage,score_lvl_min=6,score_lvl=10,score_throwSnowball_min=1,tag=holdingFireSpell] ~ ~ ~ execute @e[type=Snowball,c=1] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:2}
scoreboard players set @a throwSnowball 0
LVL 11-15 - exact copy of the above commands with only the lvls adjusted from 6 and 10 to 11 and 15 - doesn't make fireballs
scoreboard players tag @a remove holdingFireSpell
scoreboard players tag @a add holdingFireSpell {SelectedItem:{tag:{FireSpell:1}}}
scoreboard players tag @a add holdingFireSpell {Inventory:[{Slot:-106b,tag:{FireSpell:1}}]}
execute @a[team=team_mage,score_lvl_min=11,score_lvl=15,score_throwSnowball_min=1,tag=holdingFireSpell] ~ ~ ~ execute @e[type=Snowball,c=1] ~ ~ ~ summon Fireball ~ ~ ~ {direction:[0.0,0.0,0.0,0],ExplosionPower:3}
scoreboard players set @a throwSnowball 0
I thought it would be something simple like spelling but I copied and pasted the commands from the working code twice and have rebuilt the CB chain three times trying to make it work. I guess it could be something in the scoreboard but the lvl reads 15 and no fireball. I reduce my lvl to 10 and the fireball works.
On a side note, any ideas about maintaining a 2 snowball limit in the hotbar?
Do not do this. As pointed out by @nigathan it can be fixed by moving some commands (Thank you for that, by the way. Nice catch).
After moving the commands, it still works. The new order should be:
these work perfectly for me. The summon commands must be first, then the others follow.
Ok, redid all the chains and it now works for all levels (two HUGE thumbs up!!) but I still need 2 snowballs in the hotbar to cast the spell while in GM2. I can live with that but are you sure this isn't the case with you?
I am 100% positive this is not the case. Make sure you put them in the correct order, keeping in mind the fix by @nigathan, and it should work fine.
Make sure you do not have any other systems of this kind running.
Yup, I completely removed the old system and made 5 new CB chains, one for each increase in lvl, and copied and pasted your commands in the order you presented them (which included the improvement by nigathan) but I only get a snowball when i get down to the last one. Fireballs work for all levels but not with a single snowball.
Also it seems that killing a mob with a fireball doesn't register with your stats as a kill. That's a problem as my leveling system is based off of the mob kill stats. Is there a way to fix this? Killing a Ghast with their own fireball must count as a kill, maybe there is a way to register all fireball kills in this manner?
the reason it does not count as a kill is because you did not kill the entity. Even killing a ghast with it's own fireball, you did not kill it. The fireball killed it. It wouldn't even make sense logically. You throw a snowball and so a new entity is spawned, the fireball, which is then hit by the snowball. The fireball has no interaction at all with the player, so how would the stat even know who killed it.
the mobKills stat only tracks players who deal the killing blow. You will need to design your own system for tracking this, or handle levels differently. One solution would be to give every player an ID score, and set the fireballs score to the same value when summoned. Now you know which fireball belongs to whom. How you proceed from there is dependent on the design and needs of your project.
a similar issue can be found with the damageDealt stat. It only tracks player-to-entity attack damage. So hitting an entity with an arrow does not count towards the score, even though logically the player dealt the damage. However internally it was the arrow, not the player.
I see, but at least the player gets credit for the arrow kills. I will start a new thread on this, thanks for the help with the Fireball spell.
I tried to this in 1.13 replacing the commands but it still doesn't work, any ideas how to do this in 1.13?
Is there any way how you could make a command plug-in that would allow a player to throw a fireball in MCPE. IveI tried your commands but they haven't worked because of how the command wasn't found.
Welcome