#Raging at .mcfunctions

1 messages · Page 1 of 1 (latest)

tough flint
#

Can i have a detailed description of what the heck a .mcfunction does? I have tried like 5 times to make a .mcfunction it works its just i can't fir the life of me lock it

pastel mason
#

It's like an npc. It's just a file that is able to run a whole pile of commands. It has no abilities like a command block, no conditional mode, no redstone mode, and no tick delay.

To make them "always run" there is also the tick.json file for that. Bur besides that, thats it you use /function to run them, and you code all of your own logic.

They are able to run a huge number of commands but have less ability then command blocks.

unkempt egret
#

As in, functions have more ability in the sense that they’re more performant; have more room for optimisations; allow for recursive functions; etc. — so I assume u mean they can’t run as many commands per tick

#

So a little bit confusing wording saying they have less ability

pastel mason
#

I don't really know if thats true that functions are more performant since I have never truly tested it.

But I am refereeing to the the fact that command block have (chain, conditional, and repeat modes), (needs redstone, and always active modes), (conditional, and unconditional modes) and they allow for a (tick delay), functions have none of that.

tough flint
#

I just gave up in the end, ty though

#

I did relatively know this stuff like the tick.json i was just struggling to make it run constantly but also once per action

#

I know you use tags and stuff to stop commands and stuff but i was struggling too much i did like 5-6 versions all of which failed 😭

pastel mason
# tough flint I just gave up in the end, ty though

I mean if you are open to sharing all of your code and as long as you explain in enough detail you will find piles of help on in reason on this Discord server, if you do that you could probably get your problem solved within a day or two.

tough flint
#

Meh functions just kinda suck 🤷‍♂️

#

Commands are superior

pastel mason
#

No not really it's just a point of view. Personally, since I use the script-api, so both commands and functions suck in my point of view, but that's why it's personal preference.

unkempt egret
#

But yeah I don’t think the ac performance dif between just functions and blocks is super substantial by itself — it’s just a platform for other optimisations for the most part

unkempt egret
unkempt egret
# tough flint I know you use tags and stuff to stop commands and stuff but i was struggling to...

The tag is used as a stop condition
It works by targeting entities without tags to perform an action, and then at the end of the sequence, u simply need to add a tag to the entity

By doing this, the function will now activate only once on targets without the tag, before the tag is added, meaning they no longer meet the conditions for the prior commands, and thus they won’t be targeted by the system again unless the tag is removed