#Execute if, in mcfunction files

1 messages · Page 1 of 1 (latest)

mint cape
#

So i cannot get any /execute if .... commands to work when inside of an mcfunction file.
I am wanting to detect when a block at coordinates 0, 62, 0 in the end has a certain nbt value.
The command works fine in minecraft, and inside of command blocks. but it just stops working completely when in an mcfunction file.
Does anyone know why this is, and how i could get around this?

elder folioBOT
#

<@&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

tribal dust
#

How are you running the function?

#

(also, wrong help channel but it's fine)

mint cape
#

oh sorry.
I am just running it via my tick function. basically the tick.mcfunction is running the check.mcfunction file.

tribal dust
#

Okay, follow up questions:

  • Are you certain your tick function is running?
  • What is the command in the tick function that runs the check function?
  • Does the check function work if you run the function in chat, not just the command(s) inside of it?
wintry steeple
#

Also if this is 1.21 you might be following an outdated tutorial. If it is, make sure the folders are named function and tags/function

fair onyx
#

I'd also add, be sure the dimension the "execute if block" is working in is the expected one or use "execute in"

wintry steeple
#

@mint cape Did you get this working? Do you need more help, or should we close the thread?