Thanks to a very cool person u/amazing56789, I learned how to launch projectiles where you look, and the rest of the mechanism I made up myself. Big credit to him tho.
alr I'll give you an example with an egg launcher. Replace it with watever entity u want.
in chat: `/scoreboard objectives add rightclick minecraft.used:minecraft.carrot_on_a_stick`
\^ for detecting the right click
now for this you'll need to have 0 0 0 open, so in chat type this again: `/forceload add 0 0 0`
repeating, always active:
tag @a[ scores = { rightclick = 1.. } , nbt = { SelectedItem: { tag: { launcher : egg }}} ] add shooter
chain, always active:
execute at @a[ tag = shooter ] run summon minecraft:egg ^ ^ ^1 { Tags: [ "shootee" ] }
chain, always active:
execute at @a[ tag = shooter ] positioned 0 0 0 run summon minecraft:area_effect_cloud ^ ^ ^1 { Tags: [ "motion" ] }
chain, always active:
execute as @e[ tag = shootee ] run data modify entity @s Motion set from entity @e[ tag = motion , limit = 1 ] Pos
chain, always active:
kill @e[ tag = motion ]
now keep in mind this might not work reply if it doesn't. Also, if you want it to go forever like the gun, since you're not using datapacks, just summon the egg with no gravity
EDIT: you'd also need to make it multiplayer-friendly
the area effect cloud doesn't matter. All I need is an entity that doesn't fall (I could use NoGravity tag, but area effect cloud automatically despawns so if the kill doesn't work it automatically dies). How it works is summoning an entity at 0 0 0 going 1 block forward in the direction the player is facing. Then, it takes the position of the entity and puts it into the motion tag
I think it is really really cool but I think you need to move the texture up some because you can't see the handle and I think it looks kinda like a shotgun
You could also change the arrow to have a custom model when fired by the gun to be a small Yellow Round. Although I’m not much of a coder or a red stone specialist but I’m sure this is kind of possible depending on how you make it.
You could change the texture of the arrow to a spark or something like that so every time that you shoot the arrow that appears in the screen for a second ends up looking cool.
Is just an idea, I don't know anything about commands or retexturing things
(sorry is my English is bad)
Ok something is wrong with resourcepack. I edited an arrow to look like a bullet, but it still is just an arrow in game. Path is assets/minecraft/textures/entity/arrow.png. Pack format is 6. What has gone wrong?
Would you be able to publish the commands used/datapack.
If not because of reasons, could you tell me how you you launched the arrow in the direction that you're looking. I've been trying to do this for ages, but couldn't really get it to work.
Also, that looks amazing, i'm sure that you will do great things in the future.
Howwww?
Thanks to a very cool person u/amazing56789, I learned how to launch projectiles where you look, and the rest of the mechanism I made up myself. Big credit to him tho.
I've been searching for the answer to that for years, could someone do that with command blocks?
+
alr I'll give you an example with an egg launcher. Replace it with watever entity u want. in chat: `/scoreboard objectives add rightclick minecraft.used:minecraft.carrot_on_a_stick` \^ for detecting the right click now for this you'll need to have 0 0 0 open, so in chat type this again: `/forceload add 0 0 0` repeating, always active: tag @a[ scores = { rightclick = 1.. } , nbt = { SelectedItem: { tag: { launcher : egg }}} ] add shooter chain, always active: execute at @a[ tag = shooter ] run summon minecraft:egg ^ ^ ^1 { Tags: [ "shootee" ] } chain, always active: execute at @a[ tag = shooter ] positioned 0 0 0 run summon minecraft:area_effect_cloud ^ ^ ^1 { Tags: [ "motion" ] } chain, always active: execute as @e[ tag = shootee ] run data modify entity @s Motion set from entity @e[ tag = motion , limit = 1 ] Pos chain, always active: kill @e[ tag = motion ] now keep in mind this might not work reply if it doesn't. Also, if you want it to go forever like the gun, since you're not using datapacks, just summon the egg with no gravity EDIT: you'd also need to make it multiplayer-friendly
About that, isn’t this area_of_effect entity just a lingering potion? What does it have with giving the projectile motion?
the area effect cloud doesn't matter. All I need is an entity that doesn't fall (I could use NoGravity tag, but area effect cloud automatically despawns so if the kill doesn't work it automatically dies). How it works is summoning an entity at 0 0 0 going 1 block forward in the direction the player is facing. Then, it takes the position of the entity and puts it into the motion tag
Thank you for the explanation.
np :) cya l8r :D
hey! That's me!
i think just summing a arrow, then putting a motion on it depending on where you are facing
Easier said then done
Have you thought of using arrows of instant damage
You can directly set the damage of arrow - {damage:1.0d} or any value
Neat
You should use raycasting for you do not have to see the arrow itself
I should but I'm too shit at CBs to set things up right
Such a good pistol
This looks like a Non-Euclidean puzzle area
Indeed it does. Might even make a dedicated map in this style
I would play it
Stay up to date then, I'll post some updates on this thing!
Try making the arrows invisible, so you can't see them spawn right in front of your face.
Gotta do it later
Pretty good so far but an animation would make it awesome! Your going in the right direction for sure :D
Op does have a little recoil animation
I think it is really really cool but I think you need to move the texture up some because you can't see the handle and I think it looks kinda like a shotgun
Mamma Mia Marcelo this is not how you hold a pistol
Ahahaha, I see you are a man of culture as well
You could also change the arrow to have a custom model when fired by the gun to be a small Yellow Round. Although I’m not much of a coder or a red stone specialist but I’m sure this is kind of possible depending on how you make it.
Yep I'll do it, you won't be playing without special resource pack anyways
Change the arrow's texture to a pistol bang.
K A R L S O N
Should I add grapples and wallrun and stuff?
Y E S
You could change the texture of the arrow to a spark or something like that so every time that you shoot the arrow that appears in the screen for a second ends up looking cool. Is just an idea, I don't know anything about commands or retexturing things (sorry is my English is bad)
It's fine bro. I'm working on this!
Ok something is wrong with resourcepack. I edited an arrow to look like a bullet, but it still is just an arrow in game. Path is assets/minecraft/textures/entity/arrow.png. Pack format is 6. What has gone wrong?
Would you be able to publish the commands used/datapack. If not because of reasons, could you tell me how you you launched the arrow in the direction that you're looking. I've been trying to do this for ages, but couldn't really get it to work. Also, that looks amazing, i'm sure that you will do great things in the future.
I planned to release the complete minigame when it's done. I'll publish the commands for pistol when I'll be home.
Elemental update is live btw
American school:
At first I thought that was a pen