1

Need help with Command directions

RedstoneAnaconda's Avatar RedstoneAnaconda7/26/15 6:53 pm
7/27/2015 9:45 am
GerganaGZ's Avatar GerganaGZ
i want to make a gun in vanilla minecraft so i need some help with command directions and summoning arrows in that specific direction.
if you will help me with that i will try to make OneCommand minecraft vanilla Guns
Posted by RedstoneAnaconda's Avatar
RedstoneAnaconda
Level 2 : Apprentice Network
1

Create an account or sign in to comment.

13

1
07/27/2015 9:29 am
Level 2 : Apprentice Network
RedstoneAnaconda
RedstoneAnaconda's Avatar
/summon MinecartCommandBlock ~ ~1 ~ {Command:kill @e[type=MinecartCommandBlock,r=1],Riding:{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-2 ~-1 {Command:fill ~ ~ ~1 ~1 ~7 ~1 stone},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-2 ~1 {Command:fill ~ ~ ~-1 ~1 ~7 ~-1 redstone_block},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-2 ~-1 {Command:"/scoreboard objectives add dss dummy"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-2 ~1 {Command:"/scoreboard objective add KillA dummy"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-1 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=157,rym=113,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[-0.5,-0.5,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~-1 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=67,rym=23,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[-0.5,-0.5,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-1 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=-113,rym=-157,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~{Motion:[0.5,-0.5,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~-1 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=112,rym=68,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.5,-0.5,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~ ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,rym=-112,ry=-68,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[-0.5,-0.5,0.0],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~ ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=-158,rym=158,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.5,-0.5,0.0],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~ ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=22,rym=-22,rx=89,rxm=10] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.0,-0.5,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~ ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=157,rym=113,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[-0.5,0.5,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~1 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=-113,rym=-157,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[-0.5,0.5,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~1 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=67,rym=23,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.5,0.5,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~1 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,rym=-67,ry=-23,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.5,0.5,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~1 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=112,rym=89,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[-0.5,0.5,0.0],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~2 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,rym=-112,ry=-68,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.5,0.5,0.0],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~2 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=-158,rym=158,rx=-10,rxm=-89] ~ ~1 ~ summon Arrow ~ ~ ~ {Motion:[0.0,0.5,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~2 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=22,rym=-22,rx=-10,rxm=-89] ~ ~ 1~ summon Arrow ~ ~ ~ {Motion:[0.0,0.5,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~2 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=22,rym=-22] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[0.0,0.04,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~3 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=-158,rym=158] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[0.0,0.04,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~3 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,rym=-112,ry=-68] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[0.5,0.04,0.0],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~3 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=112,rym=68] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[-0.5,0.04,0.0],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~3 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,rym=-67,ry=-23] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[0.5,0.04,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~4 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=-113,rym=-157] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[0.5,0.04,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~4 ~1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=67,rym=23] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[-0.5,0.04,0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~4 ~-1 {Command:"/execute @p[score_dss_min=1,score_dss=1,ry=157,rym=113] ~ ~1 ~ summon Arrow ~ ~1 ~ {Motion:[-0.5,0.04,-0.5],Life:300}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~4 ~4 ~1 {Command:"/scoreboard players set @e[type=Arrow] KillA 1 {inGround:1b}"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~5 ~-1 {Command:"/kill @e[type=Arrow,score_KillA_min=1,score_KillA=1]"},Riding:{id:MinecartCommandBlock,Command:blockdata ~3 ~5 ~1 {Command:"/scoreboard players set @p dss 1 {SelectedItem:{id:minecraft:diamond_hoe,display:{Name:\\\"Gun\\\"}}}"},Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~ redstone_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~-1 ~3 ~5 ~-1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~-1 ~4 ~4 ~-1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~1 ~3 ~5 ~1 command_block,Riding:{id:MinecartCommandBlock,Command:fill ~3 ~-2 ~1 ~4 ~4 ~1 command_block,Riding:{id:MinecartCommandBlock,Command:setblock ~1 ~2 ~ wall_sign 4 replace {Text1:"{text:\\\"Guns\\\",color:black}",Text2:"{text:\\\"in Vanilla\\\",color:black}",Text3:"{text:\\\"Minecraft\\\",color:black}",Text4:"{text:\\\"Cool\\\",color:black,clickEvent:{action:\\\"run_command\\\",value:\\\"fill ~ ~-5 ~-2 ~5 ~6 ~2 air\\\"}}"},Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~-2 ~5 ~5 ~2 stained_glass 5 replace stained_hardened_clay 5,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-3 ~-2 ~5 ~6 ~2 stained_hardened_clay 5 hollow,Riding:{id:MinecartCommandBlock,Command:gamerule commandBlockOutput false,Riding:{id:MinecartCommandBlock,Riding:{id:FallingSand,Block:activator_rail,Time:1,Riding:{id:FallingSand,Block:redstone_block,Time:1,Riding:{id:FallingSand,Block:stone,Time:1}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}} could you look at this?
is just your command
1
07/27/2015 9:45 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
Hihihi
1
07/27/2015 9:25 am
Level 2 : Apprentice Network
RedstoneAnaconda
RedstoneAnaconda's Avatar
fixed
1
07/27/2015 9:22 am
Level 2 : Apprentice Network
RedstoneAnaconda
RedstoneAnaconda's Avatar
[16:21] The dataTag does not match for Anaconda
this the error from this : /scoreboard players set @p dss 1 {SelectedItem:{id:minecraft:stick,display:{Name:"Stick"}}}
1
07/27/2015 9:23 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
Rename the item in the anvil, for example rename it Gun or something and later edit the command (Name:"Gun")
1
07/27/2015 8:50 am
Level 2 : Apprentice Network
RedstoneAnaconda
RedstoneAnaconda's Avatar
right now i go and check your comma and then i put the right click detection
1
07/27/2015 8:55 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
Ok, but it's not one command, in the pastebin are 24 commands, so make sure you know that (just kidding... maybe?)
And I made a little edit on them, so now you can paste the commands for your system
1
07/27/2015 8:49 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
Hey, don't be too fast Just test it out, see if it have bugs, and later post it XD Oh and yeah, if it have bugs, just pm me and I will help you or post here
1
07/27/2015 6:03 am
Level 70 : Legendary Engineer
Bertiecrafter
Bertiecrafter's Avatar
use rx rxm, ry and rym to detect players in specific areas, for ex... from -45 to 45 degrees (straight ahead)... (@a[rym=-45,ry=45]

use the Motion tag to summon arrows in a direction.
/summon Arrow ~ ~ ~ {Motion:[1.0,0.0,0.0]} for ex

this would come together in something like:
/execute @a[rym=-45,ry=45] ~ ~ ~ /summon Arrow ~ ~ ~ {Motion:[1.0,0.0,0.0]}
when using parts or 90 degrees, you only have 4 directions:
-44 to 45, 46 to 135, 136 to 225 and 255 to -45

you can make 8 directions, for more accuracy, but you need to devide the 360 degrees in 8 parts, so parts of 45 degrees.
This means that your first part becomes -22 to 23 for ex.
1
07/27/2015 12:52 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
I can't help you a lot with the arrows, but I can with the player rotation detection. But if you want to summon an arrow in every direction you want to look at.. you will need over 100 command blocks, so..
Look at this video, could help you a little: http://youtu.be/rYxxb9i7Bxs

also for the arrows, to summon them in different directions, use the 'Motion' tag on them

Edit: Later, when I'm home if you want I can help you a little more
1
07/27/2015 8:00 am
Level 2 : Apprentice Network
RedstoneAnaconda
RedstoneAnaconda's Avatar
what motion should i type for this? ===> @a[rym=-1,ry=1rxm=-1,rx=1] ?
1
07/27/2015 8:38 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
I can't tell you correctly, so... For this system a 24 command blocks should be enough
I will write the commands, you need to put on, and later if you want just post if it helps

So for the gun you need when it's holded, to give a score on a scoreboard
for example, but you need to make a scoreboard with the dummy tag
/scoreboard objectives add dss dummy
later on a clock:
/scoreboard players set @p dss 1 {SelectedItem:{id:minecraft:(the id of the gun, ex. potato),display:{Name:"The name of the gun"}}}

Later if you made already a right-click detection, you need only to make the commands, when you right-click in a position you look at to summon an arrow. For the directions for this, just I created a paste in pastebin, because they are 24 commands, you need to paste for them
Be sure, that you made all these things and later experiment with it.

The pastebin link: http://pastebin.com/Z806HwvP

I shouldn't test this yet, but just try, maybe it will work good

Edit: If you want the arrows to delete themselfs, when they are on the ground, add two more command block on a clock:
/scoreboard players set @e[type=Arrow] dss 1 {inGround:1b}
/kill @e[type=Arrow,score_dss_min=1,score_dss=1]

Hope I helped
1
07/27/2015 8:47 am
Level 2 : Apprentice Network
RedstoneAnaconda
RedstoneAnaconda's Avatar
Ty very much i will try to post the gun today
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome