1
Guns in Vanilla Minecraft [1.8.7]
Anybody can help me build a gun?
Create an account or sign in to comment.
8
1
FalseKingI suggest using the swords when making your guns. First you must test for diretion, that's the easy part. Then, you need to constantly tp a sheep into anyone holding a gun. Use this:/testfor @a[] {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:wooden_sword"}]}
-->This is code for only the first slot. You can change both numbers to change which slot is detected.
To fire, swing the sword. A scoreboard will track when you attack the invisible, invincible, soundless sheep, and when that scoreboard is "noticed," it will find which direction you are facing, and fire an arrow in said direction.
I think testing the direction is the hardest part. i don't understend yet how to do that.
1
FalseKingI suggest using the swords when making your guns. First you must test for diretion, that's the easy part. Then, you need to constantly tp a sheep into anyone holding a gun. Use this:/testfor @a[] {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:wooden_sword"}]}
-->This is code for only the first slot. You can change both numbers to change which slot is detected.
To fire, swing the sword. A scoreboard will track when you attack the invisible, invincible, soundless sheep, and when that scoreboard is "noticed," it will find which direction you are facing, and fire an arrow in said direction.
Just to make this a bit easier, there is actually a SelectedItem tag that allows you to simply put in the data of the item, regardless of the slot it's in.
testfor @a {SelectedItem:{id:"minecraft:wodden_sword"}}
1
I suggest using the swords when making your guns. First you must test for diretion, that's the easy part. Then, you need to constantly tp a sheep into anyone holding a gun. Use this:
To fire, swing the sword. A scoreboard will track when you attack the invisible, invincible, soundless sheep, and when that scoreboard is "noticed," it will find which direction you are facing, and fire an arrow in said direction.
/testfor @a[] {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"minecraft:wooden_sword"}]}
-->This is code for only the first slot. You can change both numbers to change which slot is detected.To fire, swing the sword. A scoreboard will track when you attack the invisible, invincible, soundless sheep, and when that scoreboard is "noticed," it will find which direction you are facing, and fire an arrow in said direction.
1
MarkTheHuntkmm... He Sayd Vannila . Not Modded!
I know, and I said vanilla guns are finicky at best, a mod gun would be exponentially better.
1
Mark you could give me your mail so we could make that gun.
1
i've been trying to make like a re-textured hoe , what shoots when i have the gun score 1
1
kmm... He Sayd Vannila . Not Modded!
i made a some kind of a Hook Knife.
Command in that Spoiler
If u were not Looking for this then ill try to make something diffrent.
i made a some kind of a Hook Knife.
Command in that Spoiler
If u were not Looking for this then ill try to make something diffrent.
Click to reveal
/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:"/give @p fishing_rod",Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~ redstone_block,Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~-1 command_block 0 replace {Command:fill ~ ~ ~1 ~2 ~ ~1 stone},Riding:{id:MinecartCommandBlock,Command:setblock ~3 ~-2 ~1 command_block 0 replace {Command:fill ~ ~ ~-1 ~2 ~ ~-1 redstone_block},Riding:{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~-1 command_block 0 replace {Command:"/execute @e[type=unknown,3] ~ ~ ~ /summon Snowball ~ ~30 ~"},Riding:{id:MinecartCommandBlock,Command:setblock ~4 ~-2 ~1 command_block 0 replace {Command:"/execute @e[type=unknown,r3] ~ ~ ~ /effect @e[type=!Player] 7 1 10"},Riding:{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~-1 command_block 0 replace {Command:"/execute @e[type=Snowball,r=10] ~ ~ ~ /kill @e[type=unknown]"},Riding:{id:MinecartCommandBlock,Command:setblock ~5 ~-2 ~1 command_block 0 replace {Command:"/execute @e[type=unknown,r=7] ~ ~ ~ /tp @p @e[type=unknown]"},Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-2 ~-2 ~6 ~-2 ~2 stained_glass 0 replace stained_hardened_clay 0,Riding:{id:MinecartCommandBlock,Command:fill ~2 ~-3 ~-2 ~6 ~-1 ~2 stained_hardened_clay 0 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}}}}}}}}}}}}}}}}}}
1
Guns in vanilla are finicky at best. Best use something like this. If you don't want to install the mod on your own, you can use the Technic Launcher to find one with it, or any other gun mod you fancy.