So I have been messing around with command blocks lately, however I really just a beginner at them. I was wondering if it were possible in any way to play catch with just command blocks?
My idea initially was that when a player received damage from a snowball or made contact with one then another command block would register a give command to give them a snowball. Is this even possible?!?
It seems fairly straight forward but I cant seem to find a way for the command blocks to register player damage. If anyone could help me out or tell me that it wont work, that would be great because this has been driving me crazy lately.
Seeing as snowballs do no damage, a damage counter is useless. To do this though, couldn't you just do an execute at all within a small radius of a snowball setting a score, and setting a different score for those farther away?
Properly configured, this should work.
Rollback Post to RevisionRollBack
Also take a look at this guide if you are requesting builders for a server/project.
Please note, if I deny a suggestion because it is already possible, then I mean it is already possible withing 10 command blocks (That do not spawn other command blocks) or up to 5 creations (Command blocks that spawn other command blocks) to make your suggestion.
If I critique your suggestion I am not hating on you. Learn the difference.
Just realized that the redstone pulse wasnt catching it as the snowball was near me. Set it to a faster pulse and now it registers. My only problem is trying to figure out how I would give the player that was near the snowball, another snowball.
EDIT: Scratch that. There are multiple issues that i've found. 1.) Pulse still isnt fast enough to register 100% of the time. 2.) The command block registers as you throw the snowball as well, thus giving the thrower a snowball. 3.) still cant seem to designate the give command to the person that is close enough to the snowball.
Just realized that the redstone pulse wasnt catching it as the snowball was near me. Set it to a faster pulse and now it registers. My only problem is trying to figure out how I would give the player that was near the snowball, another snowball.
You should just put a comparator coming out of the execute command block that goes into a give command block. The comparator may become stuck on at some point I can't remember how it works with execute though.
You should just put a comparator coming out of the execute command block that goes into a give command block. The comparator may become stuck on at some point I can't remember how it works with execute though.
EDIT: YES 900 POSTS
Thats what I have set up, but I fail to see how that would work when the snowball reaches a player that is further away from the command block than the thrower. Also I was looking at some tags and theres one that applies to snowballs called "Shake" its whenever the snowball collides with an object. Could I test for that? And thank you so much for helping!
Not 100 percent sure if will move correctly but its worth trying... I know it works for fireballs.... There is a way to detect an item's age and determine when to execute but I cant for the life of me remember where I read it at.. I will keep looking for you...
And Adjust the age to determine how long the snowball will fly in the air before turning into a receivable item... Then play catch all day! And I recommend checking on youtube for instructions on how to make a fill clock. A fill clock will be the best type of clock you could use for a fast clock... Put it in your spawn chunk for best results...
Not 100 percent sure if will move correctly but its worth trying... I know it works for fireballs.... There is a way to detect an item's age and determine when to execute but I cant for the life of me remember where I read it at.. I will keep looking for you...
I'm unsure of what you're trying to do here. Are you trying to summon an item tile of a snowball or an actual thrown snowball? Cause this will do neither of those things. For the item, you must summon an Item entity and give it an Item:{id:"minecraft:snowball",Count:1} tag. For the projectile, the entity is called Snowball.
I'm unsure of what you're trying to do here. Are you trying to summon an item tile of a snowball or an actual thrown snowball? Cause this will do neither of those things. For the item, you must summon an Item entity and give it an Item:{id:"minecraft:snowball",Count:1} tag. For the projectile, the entity is called Snowball.
Sorry about the Mis- type of the command...I will reiterate... However the execute command will work for what this person it looking to do.
Want an example of this working check out the dragnoz videos. I have another version of this command running in my new map and is working. But instead of it turning into a tile entity it turns into a fireball... Same command different entity. But it HAS to be on a FILL clock.. or it may not work properly.
And like i said before adjust the age to determine how long it will fly in the air before turning into the tile form. That way when it comes down you will simply be able to "catch" it... Have fun.
Edit: Also for the Age.. every 20 is roughly 1 second... It is in tics...
Sorry about the Mis- type of the command...I will reiterate... However the execute command will work for what this person it looking to do.
Want an example of this working check out the dragnoz videos. I have another version of this command running in my new map and is working. But instead of it turning into a tile entity it turns into a fireball... Same command different entity. But it HAS to be on a FILL clock.. or it may not work properly.
And like i said before adjust the age to determine how long it will fly in the air before turning into the tile form. That way when it comes down you will simply be able to "catch" it... Have fun.
Edit: Also for the Age.. every 20 is roughly 1 second... It is in tics...
Uhm.. I'm fairly certain you would need to use a scoreboard first.
/scoreboard players set @e[type=Snowball] oldEnough 1 {Age:20s}
/execute @e[type=Snowball,score_oldEnough_min=1] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:snowball",Count:1}} (Motion and direction are not needed for an item.)
/kill @e[type=Snowball,score_oldEnough_min=1] (We don't want a thousand snowball items, do we?)
Uhm.. I'm fairly certain you would need to use a scoreboard first.
/scoreboard players set @e[type=Snowball] oldEnough 1 {Age:20s}
/execute @e[type=Snowball,score_oldEnough_min=1] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:snowball",Count:1}} (Motion and direction are not needed for an item.)
/kill @e[type=Snowball,score_oldEnough_min=1] (We don't want a thousand snowball items, do we?)
That is why the summon only summons the item at a specific age in my command it will only summon it once. at the Age of 20 tics(or however many you want)... no scoreboard is needed.. The fill clock is running at 20 tics per second the exact length of time a real game tick is so it will be in sync with the age tics. I use this setup in my current map with no issues it doesn't make multiples. However it is true you shouldn't need to specify the direction since items don't use them.. I simply copied my command from my map and changed what was being summoned.
That is why the summon only summons the item at a specific age in my command it will only summon it once. at the Age of 20 tics(or however many you want)... no scoreboard is needed.. The fill clock is running at 20 tics per second the exact length of time a real game tick is so it will be in sync with the age tics. I use this setup in my current map with no issues it doesn't make multiples. However it is true you shouldn't need to specify the direction since items don't use them.. I simply copied my command from my map and changed what was being summoned.
But I mean, you can't just put data tags in the selector.
Edit: Furthermore, snowballs do not have the Age tag.
Edit2: Also you realize this only works with fireballs, right? When the item is summoned it is simply going to fall straight down because thrown snowballs do not interact with items like they do with fireballs. Fireballs fly the same direction the snowball is going because it is being hit by the snowball.
Hmm.. Well I suppose the Age tag could be replaced with the Shake tag so that way it could detect when it hits the person or a block... Then turn into a tile item version of itself... I knew it would drop I just figured it could be adjusted for court length and what not.. The Wiki doesnt specify how to use the Shake field it just states what it is... I imagine it would either be a true or false or a 1 or 0 or possibly just have to be in the tag in general... I will test it some time tonight and see...
Rollback Post to RevisionRollBack
Creator of The Doomed Series! My Newest Map Is: Castle of Doom! Link: Here
Hmm.. Well I suppose the Age tag could be replaced with the Shake tag so that way it could detect when it hits the person or a block... Then turn into a tile item version of itself... I knew it would drop I just figured it could be adjusted for court length and what not.. The Wiki doesnt specify how to use the Shake field it just states what it is... I imagine it would either be a true or false or a 1 or 0 or possibly just have to be in the tag in general... I will test it some time tonight and see...
Shake is pretty much unused, it will never naturally be true for a snowball.
I understand that it references an arrow but it specifies all projectiles as well except the aforementioned.. Like i said I'll test it out tonight and see for sure.
My idea initially was that when a player received damage from a snowball or made contact with one then another command block would register a give command to give them a snowball. Is this even possible?!?
It seems fairly straight forward but I cant seem to find a way for the command blocks to register player damage. If anyone could help me out or tell me that it wont work, that would be great because this has been driving me crazy lately.
Properly configured, this should work.
Also take a look at this guide if you are requesting builders for a server/project.
Please note, if I deny a suggestion because it is already possible, then I mean it is already possible withing 10 command blocks (That do not spawn other command blocks) or up to 5 creations (Command blocks that spawn other command blocks) to make your suggestion.
If I critique your suggestion I am not hating on you. Learn the difference.
Sorry, the entity type for a snowball might not be snowball, I forget, you may have to play with it.
My avatar is not made by ThePiDay, but I'm too lazy to remove this link so it can stay he
"[18:55:12] Failed to execute 'testfor @e[type=Snowball,r=1]' as Euzek"
This was the command I have registered in the command block /execute @p ~ ~ ~ testfor @e[type=Snowball,r=1]
My avatar is not made by ThePiDay, but I'm too lazy to remove this link so it can stay he
EDIT: Scratch that. There are multiple issues that i've found. 1.) Pulse still isnt fast enough to register 100% of the time. 2.) The command block registers as you throw the snowball as well, thus giving the thrower a snowball. 3.) still cant seem to designate the give command to the person that is close enough to the snowball.
You should just put a comparator coming out of the execute command block that goes into a give command block. The comparator may become stuck on at some point I can't remember how it works with execute though.
EDIT: YES 900 POSTS
My avatar is not made by ThePiDay, but I'm too lazy to remove this link so it can stay he
Thats what I have set up, but I fail to see how that would work when the snowball reaches a player that is further away from the command block than the thrower. Also I was looking at some tags and theres one that applies to snowballs called "Shake" its whenever the snowball collides with an object. Could I test for that? And thank you so much for helping!
/execute @e[type=Snowball] ~ ~ ~ /summon Item_Snowball ~ ~ ~ {Motion:[0.0,0.0,0.0],direction:[0.0,0.0,0.0]}Not 100 percent sure if will move correctly but its worth trying... I know it works for fireballs.... There is a way to detect an item's age and determine when to execute but I cant for the life of me remember where I read it at.. I will keep looking for you...Edit: Ahh Try this
/execute @e[type=Snowball,Age:20] ~ ~ ~ /summon Item_Snowball ~ ~ ~ {Motion:[0.0,0.0,0.0],direction:[0.0,0.0,0.0]}See reiteration on last post...
And Adjust the age to determine how long the snowball will fly in the air before turning into a receivable item... Then play catch all day! And I recommend checking on youtube for instructions on how to make a fill clock. A fill clock will be the best type of clock you could use for a fast clock... Put it in your spawn chunk for best results...
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
I'm unsure of what you're trying to do here. Are you trying to summon an item tile of a snowball or an actual thrown snowball? Cause this will do neither of those things. For the item, you must summon an Item entity and give it an Item:{id:"minecraft:snowball",Count:1} tag. For the projectile, the entity is called Snowball.
Sorry about the Mis- type of the command...I will reiterate... However the execute command will work for what this person it looking to do.
Want an example of this working check out the dragnoz videos. I have another version of this command running in my new map and is working. But instead of it turning into a tile entity it turns into a fireball... Same command different entity. But it HAS to be on a FILL clock.. or it may not work properly.
REITERATION TO THE COMMAND:
/execute @e[type=Snowball,Age:20] ~ ~ ~ /summon Item ~ ~ ~ {Item:{id:snowball,Count:1}} {Motion:[0.0,0.0,0.0],direction:[0.0,0.0,0.0]}
HAS TO BE ON A FILL CLOCK!
And like i said before adjust the age to determine how long it will fly in the air before turning into the tile form. That way when it comes down you will simply be able to "catch" it... Have fun.
Edit: Also for the Age.. every 20 is roughly 1 second... It is in tics...
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
Uhm.. I'm fairly certain you would need to use a scoreboard first.
That is why the summon only summons the item at a specific age in my command it will only summon it once. at the Age of 20 tics(or however many you want)... no scoreboard is needed.. The fill clock is running at 20 tics per second the exact length of time a real game tick is so it will be in sync with the age tics. I use this setup in my current map with no issues it doesn't make multiples. However it is true you shouldn't need to specify the direction since items don't use them.. I simply copied my command from my map and changed what was being summoned.
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
But I mean, you can't just put data tags in the selector.
Edit: Furthermore, snowballs do not have the Age tag.
Edit2: Also you realize this only works with fireballs, right? When the item is summoned it is simply going to fall straight down because thrown snowballs do not interact with items like they do with fireballs. Fireballs fly the same direction the snowball is going because it is being hit by the snowball.
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
Shake is pretty much unused, it will never naturally be true for a snowball.
It just references the point at which it hits something and shatters for a snowball. All projectiles except fireballs use it...
[quote] Projectiles exceptFireball, SmallFireball, and WitherSkull have these additional fields:
shake: The "shake" when arrows hit a block.
Source: http://minecraft.gamepedia.com/Chunk_format
I understand that it references an arrow but it specifies all projectiles as well except the aforementioned.. Like i said I'll test it out tonight and see for sure.
Check out Lets Play awesomeness www.youtube.com/AricaraGames
Subscribe to my youtube channel! www.youtube.com/Darkjgaming
I mean, I just tested and it doesn't ever get set to anything but 0 for a snowball. The wiki is simply saying that it does have it.