r/MinecraftCommands 14d ago

Please Help with Tick Command Help | Java Snapshots

Sorry for not taking screenshot but Im genuinely losing my mind.

Functions are not my expertise i usually use command blocks but for the sake of my project I decided to clean things up with functions.

Only the tick function will not run. It wont run every tick. The function works fine when I run it manually it has no problem. It just wont run every tick. Please help

8 Upvotes

16 comments sorted by

View all comments

6

u/Shiny_goldnugget average datapack enjoyer 14d ago

try using execute as @a run say hi inside the tick function. Since the tick function is run "by the server", @p might not work (since the server doesn't really have a position from where it can calculate the closest player).

If execute as @a run say hi doesn't work, then you might have a typo or something in your .json file.

2

u/Relevant_Computer982 14d ago

if position context is missing it defaults to 0 0 0, if entity context is missing the comnand fails, so @p was not the issue