#I Need Help With A Datapack

1 messages · Page 1 of 1 (latest)

sage lily
#

Hi. I'm Trying To Create A Blaster/gun Datapack For Personal Use, I Used A Raycast System From (TimberForge) Along With A Carrot-on-a-stick Right Click Detection System From (Legitimoose)...
The Problem Is That I'm A Noob When It Comes To Datapacks Lol (This Is My First Time Doing Anything Related To Datapacks), Currently When A Player Right Clicks With A Carrot-On-A-Stick The Chat Says, "Click" But No Raycast Is Shot... My Only Guess Is That The Function Doesn't Know What Entity To Fire The Raycast From, (The [tick.mcfunction] Code Is "execute as @a if score @s carrot matches 1.. run function carrot_stick_gun:start_raycast" ) Please Feel Free To Ask For Screenshots Of The Files

gloomy cairnBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 After a while, hit the Summon Helpers button to ping the helper team. They'll be happy to help you

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

sage lily
#

Oh... Btw The Minecraft Version This Is For Is 1.19.3

sharp badge
#

Do you have an “at @s” after the “execute as @a”?

#

From what I understand, it seems like the pack isn’t executing the raycast at the position of the player.

sage lily
#

Do You Mean Where It Says If Score @s?

sharp badge
#

If you forgot the “at @s”, the raycast will just run from 0 0 0, which obviously isn’t what we want.

#

You are executing AS all players, but after that, you need to execute AT them.

#

The two are separate

sage lily
#

I'm Sorry... I Don't Really Understand Any Of This Lol

sharp badge
#

So It would look something like “execute as @a at @s if score carrot matches 1.. run function”.

sage lily
#

I'm A Noob

sharp badge
#

We all start somewhere

sage lily
#

Would It Help If I Send A Screenshot Of The Code?

#

I'll Try "execute as @a at @s if score carrot matches 1.. run function"

#

this is what it says when i mouse over it

#

Does It Have To Be In A Different File/Location In The Datapack?

#

Should I /tp To 0 0 0 To See If There Is A Raycast?

#

(After /reload)

#

Would You Like Me To Send The Data Pack To You?

sage lily
#

I'm Sorry But I Got to Go For Tonight, But I'll Give You The File

sharp badge
#

That’s what the syntax error is for

sage lily
#

ohh

#

ok one sec

#

IT WORKS 😄

#

Tysm : )

#

i actually got to go now...

#

But Thanks Again : D : ) : ]