Reactivate command blocks. #387

Closed
opened 2025-08-08 16:07:50 +02:00 by BSXRay · 10 comments
BSXRay commented 2025-08-08 16:07:50 +02:00 (Migrated from github.com)

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

### 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_
Astralchroma commented 2025-08-08 16:25:24 +02:00 (Migrated from github.com)

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.

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.
BSXRay commented 2025-08-08 16:34:17 +02:00 (Migrated from github.com)

But i can't code.

But i can't code.
Toffikk commented 2025-08-08 16:36:05 +02:00 (Migrated from github.com)

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

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
nathan-i-martin commented 2025-08-08 16:55:38 +02:00 (Migrated from github.com)

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!

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](https://github.com/PaperMC/Folia?tab=readme-ov-file#how-to-best-configure-folia) 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!
BSXRay commented 2025-08-08 18:55:27 +02:00 (Migrated from github.com)

yes, it bites my butt

yes, it bites my butt
luigiofthebakery commented 2025-08-29 17:02:00 +02:00 (Migrated from github.com)

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.

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.
BSXRay commented 2025-09-13 13:26:19 +02:00 (Migrated from github.com)

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

omgg thank you, do i need to compile it myself?
Warriorrrr commented 2025-09-18 08:18:35 +02:00 (Migrated from github.com)

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

Please do not share links to random jar files through here.
ocelotpotpie commented 2025-12-25 04:45:24 +01:00 (Migrated from github.com)

Closing for now as command blocks aren't on the roadmap.

Closing for now as command blocks aren't on the roadmap.
Astralchroma commented 2025-12-25 19:48:44 +01:00 (Migrated from github.com)

wait, this was still open?

~~wait, this was still open?~~
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Minecraft/Folia#387
No description provided.