#tick

1 messages · Page 1 of 1 (latest)

shadow panther
#

I was wondering how to get a command working every tick bc for me tick.json acts like a one-time command and not every single tick

merry wyvernBOT
#

<@&1201956957406109788>

Someone will come and help soon!

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

🙇 If nobody has answered you by <t:1722605780:t>, feel free to use the Summon Helpers button to ping our helper team.

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

sweet cave
#

can you show the code in tick.json and tick.mcfunction?

shadow panther
fading stirrup
#

In tick.mcfunction, @s doesn't mean anything, since the function is run as the server

#

You would want to do execute as @a if items entity @s ...

#

That runs the command as all players, so @s refers to each player individually

shadow panther
#

so I should change the @s to @a?

fading stirrup
#

No

#

That would check if any player has the item and give the effect to all players

#

Do what I said above

shadow panther
fading stirrup
#

What? Changing @s to @a, or my method?

shadow panther
fading stirrup
#

No

#

execute if items @a ... checks if any of the players on the server have the item

#

effect give @a ... gives an effect to all players on the server

shadow panther
#

so what should I change so that it only gives the effect only to the player who has the trident?

fading stirrup
#

But execute as @a runs a command as each player individually, so you can check item for @s and give effects separately

fading stirrup
shadow panther
#

will it run every tick?

fading stirrup
#

Yes

#

It already is, but since @s refers to no one, nothing is happening

shadow panther
#

I dont think it works, I dont regain the effect after I hold the item again

fading stirrup
#

Show the command you are using

shadow panther
#

in?

fading stirrup
#

In tick.mcfunction

shadow panther
fading stirrup
#

Hmm ok

#

Try adding a /say command in tick.mcfunction to check if it's actually running

shadow panther
#

it worked but not every tick

unborn cobalt
#

Think your folder names are wrong. Are you in 1.21?

shadow panther
#

yes

unborn cobalt
#

Your namespace's function folder is named correctly, but minecraft/tags/functions should be minecraft/tags/function

shadow panther
#

now it worked, thank you!

merry wyvernBOT
# shadow panther now it worked, thank you!
🎗️ Is your question resolved?

If your question is resolved, that's great to hear! Make sure to run /resolve or click the Resolve Question button. Otherwise, feel free to continue asking for help! :D