Simple question really; what I want to know is if it's possible to throw a snowball at somebody and have command blocks make it so that the projectile does damage. I imagine that for a snowball itself, no, that can not happen. I don't really recall snowballs having a damage tag like anvils...
So one way of cheesing it, I imagine, is to have the snowball be replaced with an arrow in mid-air that has the same trajectory. But I'd rather it stay as a snowball throughout the entire throw. Is this possible?
Bonus question: Is it possible for a rapid release of several snowballs to do less damage in the situation than just one per second?
Rollback Post to RevisionRollBack
So I was working on this really cool resource pack a while ago, but bad progress nonwithstanding, I think I found something much better... I'm probably gonna never release another custom Minecraft map.Until we meet again...
You could make it that when it gets very close to a player (right before it hits) run an execute that gives an instant damage effect to that player, then kill the snowball
Huh. That could work, actually. The red particles would be pretty cool as well.
Unfortunately, I don't really know how to do any of this yet. I'll figure it out some day!
Rollback Post to RevisionRollBack
So I was working on this really cool resource pack a while ago, but bad progress nonwithstanding, I think I found something much better... I'm probably gonna never release another custom Minecraft map.Until we meet again...
Now this system probably needs ALOT more optimisations to make it work correctly, but that's just the "main ground" of it
You'd probably want to test this first, but you shouldn't need to kill the snowball, also you don't need to wait 1 tick. You can do it on the same tick just as long as the kill is triggered after the effect. With the r=1 there will probably only ever be 1 tick that triggers the effect command, if even that, because of how fast the snowball will be traveling. And you don't need the double execute on the effect command.
A better solution might be to use a wither effect because it won't do any extra damage if it's run twice in the same second. This will also prevent snowballs from doing as much damage when there are several of them, solving your bonus question.
So in the end, this one command should do the trick for you:
But now this might cause the player throwing the snowball to take damage as well, so let's add a scoreboard objective to track the snowball's life time:
I suggested the effect, not the actual potion. I was suggesting you actually give the person the effect (I can't remember its ID off the top of my head). It would deal damage but not show any particles.
I suggested the effect, not the actual potion. I was suggesting you actually give the person the effect (I can't remember its ID off the top of my head). It would deal damage but not show any particles.
Oh, of course.
I think I'd like to summon white particles on the hittee though, just for cool effect.
Rollback Post to RevisionRollBack
So I was working on this really cool resource pack a while ago, but bad progress nonwithstanding, I think I found something much better... I'm probably gonna never release another custom Minecraft map.Until we meet again...
There is a way to do this. Set up a command block clock and then attach it to a command block with the command /execute @e[type=Snowball] ~ ~ ~ /summon Arrow ~ ~ ~ {life:1200}. But this would create an arrow rain. Another way is the way that Xagonal stated which was when a Snowball is near an entity it effects it with instant damage then kills the snowball before any additional damage could be applied.
It defies the laws of /kill so it lags you and the arrows I think get stuck at the edge of the chunk.
What? First, where are the arrows coming from? Second, nothing can be summoned in the void, so it simply will do nothing once it has fallen below 0 y. The snowball will fall into the void and after a few seconds will be killed.
Edit: And once the snowball goes into an unloaded chunk (which is extremely unlikely considering how far snowballs travel) it is unloaded, therefore, the command blocks can no longer target it and nothing happens till that chunk is loaded again.
By void world I mean it is a customized flat world without any blocks but air in it. Also, what if you are right at the edge of the chunk? Then it can do that. I also said I think that is why it bugged. I am not sure why /kill didn't work. The arrows come from the snowball.
By void world I mean it is a customized flat world without any blocks but air in it. Also, what if you are right at the edge of the chunk? Then it can do that. I also said I think that is why it bugged. I am not sure why /kill didn't work. The arrows come from the snowball.
I know what you mean by void world, but by void I mean below 0 along the y. You cannot kill an entity if it is not loaded, nothing can target an unloaded entity until it is loaded. Meaning, no lag when it is unloaded. You were responding to my command, which summons lightning at the snowball. There are no arrows involved, that is completely different from what I was suggesting. My suggestion will not cause any lag aside from gpu issues.
I have a one command creation that turns Snowballs into Ghast balls. This could work. It is called Destructive Mobs on my Youtube channel. Since you want only Snowball damages, do this. Do a clock going 20 times per second. Attach a command block with this command: /execute @e[type=Snowball] ~ ~ ~ /summon Fireball ~ ~ ~ {direction:[],ExplosionPower:0}
Simple question really; what I want to know is if it's possible to throw a snowball at somebody and have command blocks make it so that the projectile does damage. I imagine that for a snowball itself, no, that can not happen. I don't really recall snowballs having a damage tag like anvils...
So one way of cheesing it, I imagine, is to have the snowball be replaced with an arrow in mid-air that has the same trajectory. But I'd rather it stay as a snowball throughout the entire throw. Is this possible?
Bonus question: Is it possible for a rapid release of several snowballs to do less damage in the situation than just one per second?
So I was working on this really cool resource pack a while ago, but bad progress nonwithstanding, I think I found something much better... I'm probably gonna never release another custom Minecraft map. Until we meet again...
You could make it that when it gets very close to a player (right before it hits) run an execute that gives an instant damage effect to that player, then kill the snowball
Huh. That could work, actually. The red particles would be pretty cool as well.
Unfortunately, I don't really know how to do any of this yet. I'll figure it out some day!
So I was working on this really cool resource pack a while ago, but bad progress nonwithstanding, I think I found something much better... I'm probably gonna never release another custom Minecraft map. Until we meet again...
/execute @e[type=Snowball] ~ ~ ~ execute @a[r=1] ~ ~ ~ effect @p <instant damage id> 1 <amount of damage caused> true
Then 1 tick later run...
/execute @e[type=Snowball] ~ ~ ~ execute @a[r=1] ~ ~ ~ kill @e[type=Snowball,r=1]
Now this system probably needs ALOT more optimisations to make it work correctly, but that's just the "main ground" of it
You'd probably want to test this first, but you shouldn't need to kill the snowball, also you don't need to wait 1 tick. You can do it on the same tick just as long as the kill is triggered after the effect. With the r=1 there will probably only ever be 1 tick that triggers the effect command, if even that, because of how fast the snowball will be traveling. And you don't need the double execute on the effect command.
A better solution might be to use a wither effect because it won't do any extra damage if it's run twice in the same second. This will also prevent snowballs from doing as much damage when there are several of them, solving your bonus question.
So in the end, this one command should do the trick for you:
/execute @e[type=Snowball] ~ ~ ~ effect @a[r=1] minecraft:wither 0 1
But now this might cause the player throwing the snowball to take damage as well, so let's add a scoreboard objective to track the snowball's life time:
Type this into chat:
/scoreboard objectives add lifeTime dummy
Then on your /fill or /setblock clock:
/scoreboard players add @e[type=Snowball] lifeTime 1
/execute @e[type=Snowball,score_lifeTime_min=3] ~ ~ ~ effect @a[r=1] minecraft:wither 0 1
Play around with the radius as well as the lifeTime minimum to get the desired result, remember to test throwing a snowball while running.
I suggested the effect, not the actual potion. I was suggesting you actually give the person the effect (I can't remember its ID off the top of my head). It would deal damage but not show any particles.
Oh, of course.
I think I'd like to summon white particles on the hittee though, just for cool effect.
So I was working on this really cool resource pack a while ago, but bad progress nonwithstanding, I think I found something much better... I'm probably gonna never release another custom Minecraft map. Until we meet again...
These are the White Partices i found usefull:
and:
Projects:
Cool Welcome Message using Unicode for Map Makers and Server Owners.
Q-Lock for adventure mappers that dont want their players to lose valuble items.
minecraft:command_block One-Command: Terrain Tools for adventure mappers that want to shape their world without using external tools.
There is no need for a dual execute. The /effect command has a target selector to be used:
And you can reverse the targets for the second command to also avoid dual executes:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
There is a way to do this. Set up a command block clock and then attach it to a command block with the command /execute @e[type=Snowball] ~ ~ ~ /summon Arrow ~ ~ ~ {life:1200}. But this would create an arrow rain. Another way is the way that Xagonal stated which was when a Snowball is near an entity it effects it with instant damage then kills the snowball before any additional damage could be applied.
I like: /execute @e[type=Snowball] ~ ~ ~ summon LightningBolt
That works too, except sometimes bugs out in a void world nigathan.
I was actually joking.. But I am curious how that could possibly bug out?
It defies the laws of /kill so it lags you and the arrows I think get stuck at the edge of the chunk.
What? First, where are the arrows coming from? Second, nothing can be summoned in the void, so it simply will do nothing once it has fallen below 0 y. The snowball will fall into the void and after a few seconds will be killed.
Edit: And once the snowball goes into an unloaded chunk (which is extremely unlikely considering how far snowballs travel) it is unloaded, therefore, the command blocks can no longer target it and nothing happens till that chunk is loaded again.
By void world I mean it is a customized flat world without any blocks but air in it. Also, what if you are right at the edge of the chunk? Then it can do that. I also said I think that is why it bugged. I am not sure why /kill didn't work. The arrows come from the snowball.
I know what you mean by void world, but by void I mean below 0 along the y. You cannot kill an entity if it is not loaded, nothing can target an unloaded entity until it is loaded. Meaning, no lag when it is unloaded. You were responding to my command, which summons lightning at the snowball. There are no arrows involved, that is completely different from what I was suggesting. My suggestion will not cause any lag aside from gpu issues.
I have a one command creation that turns Snowballs into Ghast balls. This could work. It is called Destructive Mobs on my Youtube channel. Since you want only Snowball damages, do this. Do a clock going 20 times per second. Attach a command block with this command: /execute @e[type=Snowball] ~ ~ ~ /summon Fireball ~ ~ ~ {direction:[],ExplosionPower:0}
I finally figured it out (for players)! This is for Minecraft 1.12, so if you need to, change the entitys' names.
You need 3 repeating command blocks with the following (the order doesn't matter) [EDITED]:
EDIT: Also add these commands:
How would I use this command in Minecraft Pocket Edition: