Folia icon indicating copy to clipboard operation
Folia copied to clipboard

Reactivate command blocks.

Open TheRealLifeBasti opened this issue 4 months ago • 8 comments

Is your feature request related to a problem?

I switched from Paper to Folia yesterday because Folia servers are multi-threaded and run better. After installing and joining the server, I noticed how well it's running, going from about 30 MSPT (Paper) to about 4-7 MSPT (Folia). The server runs perfectly, and pretty much all the plugins I use work on Folia (even my players said it runs better), but I quickly noticed one problem: command blocks aren't working. I immediately searched the internet for this problem, and the last post I saw about it was from 2023: it said that command blocks are hard-disabled. I immediately looked for plugin solutions to re-enable them, but unfortunately, there aren't any. I don't know exactly why they were disabled back then, but I would love it if they worked again. I think plugins are more reliable than command blocks, but there aren't plugins for everything. And I think it's a solvable problem now. xD

Describe the solution you'd like.

It would be great to re-enable command blocks; they're truly invaluable for many things, and I think the problems that existed back then (I think they were a bit buggy on Folia) can be solved these days. Finally, I'd like to thank you again for this amazing server software. I haven't even been using it for a day, and it's already my favorite server software. I'll continue to use it, and it would be great if command blocks worked again (like with Paper, for example).

Describe alternatives you've considered.

There aren't that many; some plugins can execute commands, but it's not a good choice because it doesn't replace repeating and chained command blocks.

Other

No response

TheRealLifeBasti avatar Aug 08 '25 14:08 TheRealLifeBasti

Not a Folia Dev, but I will say don't get your hopes up. Command Blocks present a nightmare for a concurrent server like Folia. They would be run on one region, but have to effect multiple (potentially all) regions, and the way those regions are effected would be different for different commands, necessitating reworking a lot of commands to properly schedule the effects.

But this gets worse when you consider that command blocks are blocking, meaning the region where the command block is located has to stop ticking while it waits for effects to happen in the other regions, meaning you lose a lot of the performance Folia offers. There are ways you would work around this, but it would mean changing the behavior of Command Blocks.

Paper and in turn Folia generally only care about things like Datapacks and Command Blocks to a limited extent, you are better off creating a plugin to do whatever it is you need.

Astralchroma avatar Aug 08 '25 14:08 Astralchroma

But i can't code.

TheRealLifeBasti avatar Aug 08 '25 14:08 TheRealLifeBasti

You’ll have to stick with Paper or search around for plugins/hire devs for the time being sadly, this is likely not to be resolved in the near-distant future ig

Toffikk avatar Aug 08 '25 14:08 Toffikk

Just wanna throw in my own two cents. I haven't worked on Folia but I have a pretty good idea of the complexities it faces as a piece of software.

This is just nit-picking but I saw you mention "Folia is multi-threaded and runs better", which is technically true, but with a very very massive caveat. Folia doesn't just magically "run better" there's very specific criteria that allows it to run more efficiently than Paper (player spread, beefed up hardware etc). It can actually run WORSE than a Paper server would if you aren't using it for the right use-case.

I just don't want you to have the false idea that Folia will just magically fix all your performance issues, because it can very much bite you in the butt. If you haven't read up on the reading materials for how it works, please do that, because depending on your setup you might be shooting yourself in the foot, which nobody wants! At least read the ENTIRE FAQ if you haven't

I won't repeat what Astralchroma already said, but it would be easier for you to learn Java and make your own plugins that are Folia compliant, than it would be for Folia to implement command blocks. There's just so many nuanced issues that make it impossible in terms of practicality.

Regardless I'm happy to hear that you're having a good experience with it so far! Hopefully you can figure something out!

nathan-i-martin avatar Aug 08 '25 14:08 nathan-i-martin

yes, it bites my butt

TheRealLifeBasti avatar Aug 08 '25 16:08 TheRealLifeBasti

I made a fork to reactivate most vanilla commands here: https://github.com/luigiofthebakery/Folia I have tried to use the schedulers as much as possible, but there are likely still issues with it as I haven't tested it much. Scoreboard uses synchronised maps, and most likely if a command block tries to retrieve data from other regions it won't work, so it doesn't block the thread and won't be harmful to performance. There is also of course no guarantee of the sequence with which commands perform actions on other regions, even if they are part of a sequential function defined in a datapack.

luigiofthebakery avatar Aug 29 '25 15:08 luigiofthebakery

omgg thank you, do i need to compile it myself?

TheRealLifeBasti avatar Sep 13 '25 11:09 TheRealLifeBasti

Please do not share links to random jar files through here.

Warriorrrr avatar Sep 18 '25 06:09 Warriorrrr