GitHub
Fork of Paper which adds regionised multithreading to the dedicated server. - PaperMC/Folia
1 messages · Page 1 of 1 (latest)
Fork of Paper which adds regionised multithreading to the dedicated server. - PaperMC/Folia
Exprected that PlayerDeathEvent would be called when cancelling EntityResurrectEvent but this is not the case.
I tested on a barebones paper server and folia server with the same plugin and on paper the PlayerDeathEvent is called after cancelling the EntityResurrectEvent but on folia it was not the case.
Tested on 1.21.4 latest release from folia and paper for each test server
@EventHandler
public void onDeath(PlayerDeathEvent e) {
getLogger().info(e.getEventName());
}
@EventHandler
public void onResurrect(EntityResurrectEvent e) {
e.setCancelled(true);
}
no plugins but what i showed in the steps to reproduce
1.21.4 latest folia release
No response
I'm using the bundler jar which was built with the paper recommended method
./gradlew applyPatches
./gradlew createMojmapBundlerJar
This server is running Folia version 1.21.4-DEV-master@8af1aef (2025-02-22T21:14:25Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-1c0ecd3 (MC: 1.21.4)
I rebuilt it twice now from scratch, deleted the github clone and started over. Same results.
Cancelling the resurrect event is making a keep inventory happen.
I can send a video if you don't believe me.
The only plugin is a plugin which uses this code in the main class
When i swap to the latest paper version the problem does not happen. I also tried the reobfuscated version but that is not compatible with basically any plugins these days so I have to use the mojang mappings, which from my understanding is what paper switched to in 1.21.
@EventHandler
public void onDeath(PlayerDeathEvent e) {
getLogger().info(e.getEventName(...
In Minecraft 1.21.4 Mojang added that ender pearls can load chunks. Unfortunately, this does not work as intended.
Chunks are not loaded by ender pearls.
I tested the error by building an ender bead chunk loader and leaving the area. I was shown that the region was completely unloaded. I carried out a second test by filling a launcher with 10 crates full of items. The items from the launcher or the crates were not consumed, or the redstion was inactive and the chunk was unloaded. If possible, please fix the error.
None
1.21.4-1-master@8af1aef
No response
After all this time, I've come to a rough correlation—it seems to be related to the number of players and their locations.
For a long time, I've been trying to reproduce this bug on a local server. Previously, it was only a probabilistic event on the server, so it was difficult to gather information.
But recently, a coordinate appeared on the server where this issue occurs 100% of the time, without any reason—it's always 100%.
It's almost certain that as long as that chunk is loaded, ghost pistons will appear.
I thought I had found the decisive key factor, until I perfectly replicated the chunk data to my local server.
Everything worked fine... I tried to reproduce the bug locally and then report it. But I failed. Does anyone have any ideas?
After all this time, I've come to a rough correlation—it seems to be related to the number of players and their locations.
For a long time, I've been trying to reproduce this bug on a local server. Previously, it was only a probabilistic event on the server, so it was difficult to gather information.
But recently, a coordinate appeared on the server where this issue occurs 100% of the time, without any reason—it's always 100%.
It's almost certain that as long as that chunk is loaded, ghost pistons will appear.
I thought I had found the decisive key factor, until I perfectly replicated the chunk data to my local server.
Everything worked fine... I tried to reproduce the bug locally and then report it. But I failed. Does anyone have any ideas?
I have a fix but it's not really fix that(Just simply reverted a bug fix of mojang in 1.21.2)
I think this issue is caused by something of the chunk system which downgraded the chunk ticket level earlier than vanilla an caused that ...
After all this time, I've come to a rough correlation—it seems to be related to the number of players and their locations.
For a long time, I've been trying to reproduce this bug on a local server. Previously, it was only a probabilistic event on the server, so it was difficult to gather information.
But recently, a coordinate appeared on the server where this issue occurs 100% of the time, without any reason—it's always 100%.
It's almost certain that as long as that chunk is loaded, ghost pistons will appear.
I thought I had found the decisive key factor, until I perfectly replicated the chunk data to my local server.
Everything worked fine... I tried to reproduce the bug locally and then report it. But I failed. Does anyone have any ideas?
You could see #311
After all this time, I've come to a rough correlation—it seems to be related to the number of players and their locations.
For a long time, I've been trying to reproduce this bug on a local server. Previously, it was only a probabilistic event on the server, so it was difficult to gather information.
But recently, a coordinate appeared on the server where this issue occurs 100% of the time, without any reason—it's always 100%.
It's almost certain that as long as that chunk is loaded, ghost pistons will appear.
I thought I had found the decisive key factor, until I perfectly replicated the chunk data to my local server.
Everything worked fine... I tried to reproduce the bug locally and then report it. But I failed. Does anyone have any ideas?You could see #311
There have been given a stable way to reproduce that bug
After all this time, I've come to a rough correlation—it seems to be related to the number of players and their locations.
For a long time, I've been trying to reproduce this bug on a local server. Previously, it was only a probabilistic event on the server, so it was difficult to gather information.
But recently, a coordinate appeared on the server where this issue occurs 100% of the time, without any reason—it's always 100%.
It's almost certain that as long as that chunk is loaded, ghost pistons will appear.
I thought I had found the decisive key factor, until I perfectly replicated the chunk data to my local server.
Everything worked fine... I tried to reproduce the bug locally and then report it. But I failed. Does anyone have any ideas?You could see #311
There have been given a stable way to reproduce that bug
It looks like all the reasons can be explained with [#311](https:/...
I was trying to migrate my client's server to Folia, but it seems that because you can't (dynamically) load/unload worlds, I can't do that. It's a server with a gimmick similar to skyblock (e.g. dynamic persistent small maps).
That's a bummer. 😆
World loading is relatively stable even during runtime (you just have to tweak the load code a bit)
World unloading kills the server though
I haven't had any significant success with it
The best result I had was not crashing the entire server but the world was technically still loaded even though not accessible
perhaps it is possible to wake the thread like the vanilla server does for high priority stuff like networking, as long as the folia thread is not overloaded, it will process packets as fast as possible.
perhaps it is possible to wake the thread like the vanilla server does for high priority stuff like networking, as long as the folia thread is not overloaded, it will process packets as fast as possible. if I am not busy, I will look into this issue as I noticed it a long time ago.
Yeah. that would work no doubts
The "28w Pork Tower" should operate without triggering any thread safety errors.
All entity state updates and accesses should occur on the correct (owning) region thread, ensuring smooth operation and adherence to Folia's threading.
When the "28w Pork Tower" is activated by a player, the server logs display errors such as:
Thread failed main thread check: Accessing entity state off owning region's thread...
errorlog:
log.txt
Since litematic files cannot be uploaded they are modified to have a txt file extension.
[19:41:30] [Region Scheduler Thread #9/INFO]: ℹ Server Plugins (25):
[19:41:30] [Region Scheduler Thread #9/INFO]: Paper Plugins (1):
[19:41...
https://paste.gg/p/anonymous/df6725eb31274d1f8a0934c063cf2329
Not related to plugin, most/all plugins are custom.
Not Known
This server is running Folia version 1.21.4-DEV-dev/hard-fork@d3969cd (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
No response
NullPointerException
Cannot invoke "net.minecraft.core.component.DataComponentType.isTransient()" because "dataComponentType" is null
net.minecraft.core.component.DataComponentPatch in lambda$static$1 at line 45
com.mojang.serialization.Encoder$1 in encode at line 25
com.mojang.serialization.Codec$2 in encode at line 80
com.mojang.serialization.Encoder in encodeStart at line 14
com.mojang.serialization.codecs.OptionalFieldCodec in encode at line 44
com.mojang.serialization.codecs.OptionalFieldCodec in encode at line 17
com.mojang.serialization.MapEncoder$1 in encode at line 26
com.mojang.serialization.MapCodec$2 in encode at line 82
com.mojang.serialization.codecs.RecordCodecBuilder$Instance$6 in encode at line 297
com.mojang.serialization.codecs.RecordCodecBuilder$2 in encode at line 112
com.mojang.serialization.MapCodec$MapCodecCodec in encode at line 163
com.mojang.serialization.Codec$RecursiveCodec in encode at line 217
com.mojang.serialization.Encoder in e...
I have an other stacktrace for a serialization
class java.lang.Integer cannot be cast to class net.minecraft.world.item.enchantment.ItemEnchantments (java.lang.Integer is in module java.base of loader 'bootstrap'; net.minecraft.world.item.enchantment.ItemEnchantments is in unnamed module of loader java.net.URLClassLoader @736e9adb)
com.mojang.serialization.codecs.RecordCodecBuilder$Instance in lambda$ap2$4 at line 215
com.mojang.serialization.codecs.RecordCodecBuilder$2 in encode at line 112
com.mojang.serialization.MapCodec$MapCodecCodec in encode at line 163
com.mojang.serialization.codecs.EitherCodec in lambda$encode$3 at line 34
com.mojang.datafixers.util.Either$Left in map at line 38
com.mojang.serialization.codecs.EitherCodec in encode at line 33
com.mojang.serialization.codecs.EitherCodec in encode at line 11
com.mojang.serialization.Encoder$1 in encode at line 25
com.mojang.serialization.Codec$2 in encode at line 80
com.mojang.serialization.Enc...
Provide an actual jvm stacktrace, not whatever the heck that mess is
Oh yeah sorry, this was some Sentry stacktraces.
Well I found more relevant stacktrace. The players are using some inventory sorter mods and causes issues.
I have a i9-12900k CPU and the server has 22gigs of ram allocated
[20:52:36] [Region Scheduler Thread #2/ERROR]: [CustomItemEventsListener] Le joueur YOUENN_ll à délenché une erreur avec un item custom lors d'un event BlockBreakEvent
java.lang.NullPointerException: null
at java.base/java.util.Objects.requireNonNull(Objects.java:233) ~[?:?]
at java.base/java.util.ImmutableCollections$SetN.contains(ImmutableCollections.java:944) ~[?:?]
at org.bukkit.craftbukkit.inventory.CraftMetaItem.updateFromPatch(CraftMetaItem.java:543) ~[folia-1.21.4.jar:1.21.4-DEV-d3969cd]
at org.bukkit.craftbukkit.inventory.CraftMetaItem.<init>(CraftMetaItem.java:399) ~[folia-1.21.4.jar:1.21.4-DEV-d3969cd]
at org.bukkit.craftbukkit.inventory.CraftItemMetas.lambda$static$2(CraftItemMetas.java:52) ~[folia-1.21.4.jar:1.21.4-DEV-d3969cd]
at org.b...
a0dc21b Add new tick region scheduler - Spottedleaf
When player.setRespawnLocation() is used, player's respawn point should be set to the location provided in ()
When player.setRespawnLocation() is used, player's respawn point is cleared, regardless of what is in ()
Use player.setRespawnLocation() in a plugin
Only a test plugin
version
[14:32:39 INFO]: Checking version, please wait...
[14:32:39 INFO]: This server is running Folia version 1.21.4-DEV-master@8af1aef (2024-12-16T21:50:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
No response
The tickthreads should be unparked after the flag shutdown is set to true so that they can terminate gracefully
The tickthreads are not unparked after the shutdown flag is set to false and it then failed to termiante gracefully
Stack trace of some tickthreads:
[03:33:34] [Region shutdown thread/INFO]: [RegionShutdownThread] Awaiting scheduler termination for 60s...
[03:34:34] [Region shutdown thread/WARN]: [RegionShutdownThread] Scheduler did not terminate within 60s, proceeding with shutdown anyways
[03:34:34] [Region shutdown thread/WARN]: Region Scheduler Thread #3: Did not shut down in time
[03:34:34] [Region shutdown thread/WARN]: at java.base/jdk.internal.misc.Unsafe.park(Native Method)
[03:34:34] [Region shutdown thread/WARN]: at java.base/java.util.concurrent.locks.LockSupport.park(LockSupport.java:221)
[03:34:34] [Region shutdown thread/WARN]: at io.papermc.paper.threadedregions.ScheduledTaskThreadPool$TickThr...
The command always processes without an unanticipated exception.
Issue began in: https://github.com/PaperMC/Folia/commit/1934a00bdc40d488f58c1d5d9d6fce73fb25b80c (new scheduler branch)
Run /tps in any region. Issue occurs when console executes said command at times, as well.
Terralith & Nullscape
[18:50:09 INFO]: This server is running Folia version 1.21.4-DEV-beta/new-scheduler@bb12eee (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-23ed084 (MC: 1.21.4)```
### Other
_No response_
I know that paper releases are only published on the papermc site, but I think this may be an exception for folia, for now I'm in favor of releasing it on github, at least until the stable version is released.
Did you read the /folia-dl command in the discord?
⚠️ Please do not share any links to builds of Folia at this time. We are intentionally not providing easy to find/obtain downloads right now - when the time is right, everything will be available through official PaperMC distributions.
No, I didn't even see that. You've hidden it. I'm on Discord, but I haven't really seen anything like this.
Anyway, I swallow the repository
I will try the branch in beta with the new scheduler to see if the problem persists
paste your stack trace or a paste.gg link here!
No stack trace was thrown even the watchdog
None
No response
Commit bb12eee2bdc68452dd643dd6e4efe8ecf68df3ce
It seems that the tick threads are not blocked and the tick task of globalregion got lost.(I will provide more further information if I have time(There is actually a thread dump but it's on my computer and I cannot access it currently))
A thread dump generated by jcmd:
https://pastebin.com/20xkNiGX
I've been encountering the same behavior, and I also may have confirmed that the tasks still run, I am not sure as to why, or if it's exactly this, been trying to confirm, but it seems that the global tasks still run .
There's also a wrong use of variable for isWatched
@Spottedleaf
WATCHED_HANDLE for isWatched isn't used, its using the tick
Ok, I found the issue.
final long scheduleTime = Math.max(tick.getScheduledStart(), System.nanoTime());
This is "fixing" the issue, you can replicate the bug by copying teh entire scheduled class and running something like this:
package io.papermc.paper.threadedregions;
import java.util.*;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.BooleanSupplier;
public class Main {
public static class BenchmarkRegion extends ScheduledTaskThreadPool.SchedulableTick {
private long lastPeriod = System.nanoTime();
public long getLastPeriod(){
return new Long(lastPeriod);
}
private final long id;
public BenchmarkRegion(long id) {
this.id = id;
}
@Override
public String toDump() {
return String.valueOf(id);
}
private boolean cleaned = false;
public void markCleaned(...
this will let you replicate - just rollback to schedul estart before
In Minecraft 1.21 updates, Mojang officially specified that TNT should not be able to destroy Nether portals after passing through them into another dimension.
In Folia, the TNT still destroys the portal after passing through.
Activate a TNT and cause it to be transported through a Nether portal.
No plugins and datapacks.
All version
No response
Hello ! With the branch beta/new-scheduler the issue is still there but with no stacktrace. Some players are complaining about enchantments that disapears on their pickaxe. For information the item has an uuid in NBT tags to permit a custom plugin to know if this is a special item.
Are those clients in creative mode or something? it would generally seem like they've somehow created invalid item stacks somehow; Would maybe need to see what one of these stacks look like, these NBT tags are inside of the custom_data component, right?
The clients are in survival mode, I can send you the code to generate custom items that I am using, maybe I am doing something wrong :
private static ItemStack generateItemAndAddId(final CustomItemBuilder builder, final UUID uuid, final MinecraftPlugin minecraftPlugin) {
builder.setPersistentData(CustomItemEventsListener.METADATA_KEY, uuid.toString());
return builder.toItemStack();
}
public class CustomItemBuilder {
private NamespacedKey namespacedKey;
private String nameSpaceData;
public void setPersistentData(@NonNull final NamespacedKey namespacedKey, @NonNull final String value) {
this.namespacedKey = namespacedKey;
this.nameSpaceData = value;
}
public ItemStack toItemStack() {
final ItemStack item = new ItemStack(material, amount);
final ItemMeta meta = item.getItemMeta();
if (meta != null) {
if (name != null) {
meta.displayName(name);
...
I got a new exception using the branch beta
[18:11:55 ERROR]: Error sending packet clientbound/minecraft:container_set_slot
io.netty.handler.codec.EncoderException: Failed to encode packet 'clientbound/minecraft:container_set_slot'
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:55) ~[folia-1.21.4.jar:1.21.4-DEV-bb12eee]
at net.minecraft.network.codec.IdDispatchCodec.encode(IdDispatchCodec.java:13) ~[folia-1.21.4.jar:1.21.4-DEV-bb12eee]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:27) ~[folia-1.21.4.jar:1.21.4-DEV-bb12eee]
at net.minecraft.network.PacketEncoder.encode(PacketEncoder.java:12) ~[folia-1.21.4.jar:1.21.4-DEV-bb12eee]
at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) ~[netty-codec-4.1.115.Final.jar:4.1.115.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:893) ~[netty-transport-4.1....
You have an itemstack with a null entry inside of the component patch map
[Incident](https://paste.gg/p/anonymous/095e54a2507b4a21958aa9578b963f21)
Terralith & Icendium
Not known/certain. It seems to occur when a user is near the end portal gateway.
This server is running Folia version 1.21.4-DEV-beta/new-scheduler@bb12eee (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-23ed084 (MC: 1.21.4)
### Other
_No response_
The player is going inside the portal from the overworld and spawn in a appropriate location in the nether
The player when passing inside the portal, the portal spawned under the map and the player is dead in the void.
Go inside a portal and prey to reproduce the issue x) it seems to be random
[16:46:19 INFO]: ℹ Server Plugins (5):
[16:46:19 INFO]: Bukkit Plugins:
[16:46:19 INFO]: - CoreProtect, PacifistaPlugin, spark, ViaVersion, voicechat
[16:46:41 INFO]: Checking version, please wait...
[16:46:41 INFO]: This server is running Folia version 1.21.4-DEV-beta/new-scheduler@80ab57d (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-bb12eee (MC: 1.21.4)
No response
The new thing I found is that the globalregion gets scheduled before any worker thread started, Idk if it is causing that issue but in the older scheduler, it doesn't act like this
I expect to see lower ping.
Folia seems to have an issue with ping, causing players with a ping of 10-20 to experience a rise to 35-40. While this doesn't significantly affect gameplay, it can be slightly noticeable in PvP due to the ping difference. I honestly believe this should be looked into. This issue was resolved in one of Folia's forks called ShreddedPaper. Here's the link to the fix they implemented: https://github.com/MultiPaper/ShreddedPaper/commit/2bb7a49bab464347a9878717a00563fe95cea9d9
It's really random; not everyone experiences the problem, usually players with low MS
Not caused by any plugins or datapacks.
This server is running Folia version 1.21.4-DEV-beta/new-scheduler-oldmodules@4ed107d (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Unknown version
Previous version: 1.21.1-438fbd4 (MC: 1.21.1)
That's literally just moving where the keepalive packet is sent from, it has 0 actual bearing on anything else other than maybe changing a number in the UI due to dispatching a packet sooner rather than later
There is literally 0 improvement in this outside of changing the visual of the latency lmao
Also happens on the latest version of new-scheduler branch (as of this comment).
As Pedro said, it happens when you cancel the teleport event.
(In the video, we cancel teleport event whent the user is in combat.)
https://github.com/user-attachments/assets/ad31ae7d-d004-4071-8fcd-c8806dba9fac
[10:36:10] [Region Scheduler Thread #65/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Cannot move entity off-main, context=[thread=Region Scheduler Thread #65,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[1249, 836],world=world}], world=world, chunk_pos=[2498, 1671]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[lsfolia-1.21.4.jar:1.21.4-DEV-d8d5805]
at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup.checkThread(ServerEntityLookup.java:39) ~[lsfolia-1.21.4.jar:1.21.4-DEV-d8d5805]
at ca.spottedl...
Players should be able to join the server at any time.
There is a very odd bug with the new scheduler where randomly during server uptime, Folia wont allow any players to join after the bug happens. It can happen within an hour or within 3 days, it seems to be random.
This is not plugin-induced as reverting to hard-fork branch fixes the problem. There are no errors in console (both backend and velocity) and everything seems fine, but no new players can join the server.
.
Latest version of new-scheduler branch as of this writing.
The only fix for now is reverting to hard-fork branch. Temporary solution is to restart the server when it happens.
We are not knowledgeable enough...
Expected behavior
Players should be able to join the server at any time.
Observed/Actual behavior
There is a very odd bug with the new scheduler where randomly during server uptime, Folia wont allow any players to join after the bug happens. It can happen within an hour or within 3 days, it seems to be random.
This is not plugin-induced as reverting to hard-fork branch fixes the problem. There are no errors in console (both backend and velocity) and everything seems fine, but no new players can join the server.
Steps/models to reproduce
- Compile the folia jar from new-scheduler branch.
- Have 200+ players (seems to happen more frequently with higher playercounts).
- Wait until the bug happens.
Plugin and Datapack List
.
Folia version
Latest version of new-scheduler branch as of this writing.
Other
The only fix for now is reverting to hard-fork branch. Temporary solution is to restart the server when it happe...
As of now, there is no way to get all regions that are active on a server, nor a way to run scheduled code once per region.
In my plugin, I have players creating abilities that run on the region they are in. But as of now, there is no good way to check if the location of each ability overlaps to create a collision.
Right now, each ability creates a task timer in the current location. And this timer cancels itself when needed. However, I see no way to safely check other ability locations.
I believe there should be a class used as a reference to each threaded region.
public interface ThreadedRegion extends RegionAccessor {
List<Player...
Not being able to jump after pearling.
Whenever you throw an Ender Pearl at a player or any living entity, if you jump at the same time the pearl lands, it lets you jump in the air, causing weird bug behavior. Here's a clip: https://streamable.com/wqu2uk
Throw an ender pearl to a player & jump at the same time the pearl lands.
NaN
This server is running Folia version 1.21.4-DEV-beta/new-scheduler@80ab57d (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-DEV-4ed107d (MC: 1.21.4)
No response
if I use the normal /teleport <player> <player> command, and the player has a passenger set on which he is sitting, he cannot be teleported. Teleportation with coordinates, in my test with relative coordinates (/teleport <player> ~ ~10 ~) is possible again.
The player will not be teleported, if an passenger is set.
I have the following code as an example for reconstruction:
/*
* Copyright (c) 2024-2025 LimitMedia
*/
package net.playunlimited.limitattack.commands;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.context.CommandContext;
import com.mojang.brigadier.tree.LiteralCommandNode;
import io.papermc.paper.command.brigadier.CommandSourceStack;
import io.papermc.paper.command.brigadier.Commands;
import lombok.AllArgsConstructor;
import net.kyori.adventure.text.Component;
import net.playunlimited.limitattack.config.MessagesConfig;
import net.playunlimited.limitcore.ap...
N/A
The region ticker disables before plugins, preventing any further ticks while shutting down.
For some plugins, who spawn entities or block modifications in the world, normally they can run cleanups in onDisable(). However, because synchronous tasks on disable cannot be done due to the lack of main thread, they have to pend this task to RegionScheduler. Which is disabled at the time onDisable() occurs.
This means some plugins cannot run their cleanup, such as removing entities, reverting block changes, etc.
onDisable()BetterScoreboard, packetevents, PlaceholderAPI, ProjectKorra, ViaBackwards, ViaVersion
1.21.4-DEV-master@8af1aef (2025-04-11T00:37:47Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT...
If you leave spectator mode, it should not kick you from the server with errors.
Console log
[17:38:45 INFO]: StrangeOne101 issued server command: /gamemode survival
[17:38:45 INFO]: [StrangeOne101: Set own game mode to Survival Mode]
[17:38:45 ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread Region Scheduler Thread #1 failed main thread check: Cannot asynchronously load chunks
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:51) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at net.minecraft.server.level.ServerChunkCache.syncLoad(ServerChunkCache.java:100) ~[?:?]
at net.minecraft.server.level.ServerChunkCache.getChunkFallback(ServerChunkCache.java:153) ~[?:?]
at net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:296) ~[?:?]
at net.minecraft.world.level.Level.getChunk(Level.java:1095) ~[?:?]
...
I have made the fix on Luminol PR-87, hope Folia can check it and fix this bug, thanks
The fix should probably look into what else is broken due to the teleport method no longer being called and address that instead of just moving up individual side-effects
I know it, I will provide a better way to call this fix later, I will use parent class methods to rebuild it so that can more conveniently migrate to other Entity instances
I have rewritten the code, could you please take a look again ?
The flying machine should either be paused correctly or the blocks should not become phantom air blocks after chunk unloads.
When creating a piston-based flying machine using slime blocks and pistons, if the player teleports away (or otherwise leaves the chunk) while the flying machine is moving, sometimes the location where a piston was gets replaced with an invisible air block.
This air block cannot be replaced by placing another block manually, nor by using the /setblock command.
If you drop a falling block entity like sand onto the affected area, the sand appears to fall normally and fill the gap visually, but the block remains non-solid and acts like a falling entity on the client.
From the client's perspective, it appears as if the sand is still falling even after settling.
Build a simple machine using pistons and slime blocks. (It doesn't have to be a flying machine. Use sticky pistons to...
[00:28:16] [Region Scheduler Thread #0/WARN]: [io.papermc.paper.threadedregions.RegionizedWorldData] Failed to handle packet for /188.192.213.216:46050
net.minecraft.ReportedException: Ticking player
at net.minecraft.server.level.ServerPlayer.doTick(ServerPlayer.java:1296) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at net.minecraft.server.network.ServerGamePacketListenerImpl.tick(ServerGamePacketListenerImpl.java:371) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at net.minecraft.network.Connection.tick(Connection.java:694) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at io.papermc.paper.threadedregions.RegionizedWorldData.tickConnections(RegionizedWorldData.java:521) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:2000) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1804) ~[folia-1.21.4.jar:1.21.4-DEV-8af1aef]
at io.papermc.paper.threadedregions.Ti...
You are not using the latest version of Folia, you must compile on the dev/hard-fork branch
Proved can still reproduce when teleported the the edge of tickregion
Tickregions are displayed using bluemap and this extension: https://github.com/adabugra/bluemap-folia-regions/tree/feature/1.21.4-support
Player's food level should be synced after each portal teleportation
Player's food level didn'tt get synced until they eat something or did something triggers the sync
Leave any non full food level and go through the portal then teleport to another dimension then you'll found the food level turned back to full
no plugins and datapack installed
Any latest branch of mc1.21.4 of folia
No response
I think in terms of future development and continual improvement, this might actually be worthwhile.
This is also something I struggle with. It would be great if it can be fixed as soon as possible!
For your usage, you should be creating an Interaction entity for each ability, then do something like
// <...> - Move the ability to new location
List<Entity> collided = world.getNearbyEntities(entity.getBoundingBox().expand(0.1), e -> e instanceof Interaction interaction && interaction.getPersistentDataContainer().has(new NamespacedKey("test", "key")));
if (!collided..isEmpty()) {
// Run logic of destroying this ability and the collided abilities
}
each tick in the entity scheduler of the spawned interaction entity
World#getNearbyEntities should be really efficient and Interaction entities don't tick so they're quite cheap to spam with.
For your usage, you should be creating an Interaction entity for each ability, then do something like
// <...> - Move the ability to new location
List<Entity> collided = world.getNearbyEntities(entity.getBoundingBox().expand(0.1), e -> e instanceof Interaction interaction && interaction.getPersistentDataContainer().has(new NamespacedKey("test", "key")));
if (!collided..isEmpty()) {
// Run logic of destroying this ability and the collided abilities
}
each tick in the entity scheduler of the spawned interaction entityWorld#getNearbyEntities should be really efficient and Interaction entities don't tick so they're quite cheap to spam with.
I will try this, and let you know. Thank you!
@masmc05 I have already tried using this before, but due to #353, it leaves entities everywhere in the world that are not cleaned up.
At best, it performs half as well as location vs location collisions, due to the nature of how everything is setup (and changing everything isn't in the cards right now). If there was at least an object to reference regions as well as a way to see what region you are currently in, I could sort them into maps and then try collide them that way.
@masmc05 I have already tried using this before, but due to #353, it leaves entities everywhere in the world that are not cleaned up.
At best, it performs half as well as location vs location collisions, due to the nature of how everything is setup (and changing everything isn't in the cards right now). If there was at least an object to reference regions as well as a way to see what region you are currently in, I could sort them into maps and then try collide them that way.
I can't test right now to confirm, but I'm pretty sure that shutdown thread is separate from other ticking threads, and it safely acts as the owner of all regions due to other threads not existing at that point. Are you sure you can't kill all the entities from all the regions in onDisable?
I can't test right now to confirm, but I'm pretty sure that shutdown thread is separate from other ticking threads, and it safely acts as the owner of all regions due to other threads not existing at that point. Are you sure you can't kill all the entities from all the regions in onDisable?
Are you saying it is safe to kill entities, as well as do other things like revert blocks in the standard shutdown thread?
Are you saying it is safe to kill entities, as well as do other things like revert blocks in the standard shutdown thread?
Yeah, you should be fine doing this in onDisable
Alright, will give that a test
You should use the hardfork branch as the master branch is not the latest currently
When the server shuts down, no error should occur.
When the server is shutting down, code that calls Block#getBlockData() can cause an exception.
[17:49:31 INFO]: StrangeOne101 joined the game
[17:49:31 INFO]: StrangeOne101[/127.0.0.1:52720] logged in with entity id 9 at ([world]-600.7353606258057, 74.0, 2204.650718295526)
> stop
[17:50:18 INFO]: Stopping the server
[17:50:18 INFO]: [RegionShutdownThread] Awaiting scheduler termination for 60s...
[17:50:18 INFO]: [RegionShutdownThread] Scheduler halted
[17:50:18 INFO]: Stopping server
[17:50:18 INFO]: [BetterScoreboard] Disabling BetterScoreboard v2.2.2
[17:50:18 INFO]: [ProjectKorra] Disabling ProjectKorra v1.12.1
[17:50:18 WARN]: java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.World.getCurrentWorldData()" is null
[17:50:18 WARN]: at net.minecraft.world.level.World.a_(World.java:1386)
...
The code is run on the wrong thread. As the schedulers aren't running at this point anymore, you can't run this code there anymore.
I read here that on shutdown, since schedulers are shutdown, you can do this on the shutdown thread
You are using a version that has not been updated since December 12th
Very true. I tried building the new scheduler branch but ran into issues, so just took what I could get by using main branch. So that is a good point
server run normally
server crash
no clue
[21:05:44 INFO]: ℹ Server Plugins (40):
[21:05:44 INFO]: Paper Plugins (2):
[21:05:44 INFO]: - FancyHolograms, FancyNpcs
[21:05:44 INFO]: Bukkit Plugins (38):
[21:05:44 INFO]: - AFKReward, AuctionHouse, Bounty, CelestCombat, Chunky, ChunkyBorder, CMILib, CoreProtect, CrossServer, DeluxeMenus
[21:05:44 INFO]: DiscordSRV, Essentials, FCBank, FCCore, FCInvinsibleItemframe, FCMiner, FCOptimizer, FCSign, FCWelcome, floodgate
[21:05:44 INFO]: GSit, HereTheData, LuckPerms, PlaceholderAPI, PlayerPoints, ProtocolLib, QuickShop-Hikari, RegionExcluder, ResCoins, Residence
[21:05:44 INFO]: SafariNet, spark, TAB-Bridge, Vault, VentureChat, ViaBackwards, ViaVersion, WorldEdit
This server is running Luminol version 1.21.4-DEV-dev/1.21.4-hardfork@61c3cc8 (2025-05-20T08:34:44Z) (Implementing API version 1.21.4-R0.1-SNAP...
You are on a fork of Folia. Try reproducing the bug on Folia first
8b64d78 Begin 1.21.5 update - Spottedleaf
eb187d6 Update feature patches - Spottedleaf
a3910f1 Update Paper feature patches - Spottedleaf
398ec06 Update Paper - Spottedleaf
831cb8b Fix compile - Spottedleaf
b74ed78 Use correct ticket level identifiers for change... - Spottedleaf
41099c2 Use entity ticking chunk list for determing spa... - Spottedleaf
[7864136](https://github.com/PaperMC/Fol...
The new scheduler needs to be rewritten unfortunately due to some core design flaws.
Pistons can operate normally after zombie pigmen are killed.
The pistons are not working, and the blocks pushed by the pistons have become transparent. I cannot delete or place blocks on them. The only way to make them work normally is to use the fill command to replace them with air.
Here is the recorded process of the error.
log.txt
This is the log file of the error.
2025-05-24-3.log
Here's the complete log.
This was tested in my built test environment without any plugins.
This server is running Folia version 1.21.4-DEV-master@8af1aef (2025-04-19T06:17:55Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
No response
Its not latest version 1.21.4 of Folia
[03:13:54] [Region Scheduler Thread #0/ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #25 centered at chunk [-122, 45] in world 'world_nether' failed to tick:
net.minecraft.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1836) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1666) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at java.base/java.lang.Thread.run(Thread.java:1583) ...
它不是 Folia 的最新版本 1.21.4
I just rebuilt it, and I'm sure I'm using the latest version.
This server is running Folia version 1.21.4-DEV-master@8af1aef (2025-05-24T06:57:49Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version
Use this branch : https://github.com/PaperMC/Folia/tree/ver/1.21.4
Le sam. 24 mai 2025 à 09:09, LaoMaoBoss @.***> a écrit :
LaoMaoBoss left a comment (PaperMC/Folia#362)
https://github.com/PaperMC/Folia/issues/362#issuecomment-2906528902它不是 Folia 的最新版本 1.21.4
I just rebuilt it, and I'm sure I'm using the latest version.
This server is running Folia version @.***
(2025-05-24T06:57:49Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
You are running the latest version—
Reply to this email directly, view it on GitHub
https://github.com/PaperMC/Folia/issues/362#issuecomment-2906528902, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AGJ4JPL5DNQOBEGRCPY23GT3AALI3AVCNFSM6AAAAAB5ZOAE5SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMBWGUZDQOJQGI
.
You are receiving this because you commented.Message ID:
@.***>
Should I rebase to 1.21.5?
Yes, the latest build of 1.21.4 works fine. However, I also tested the build of 1.21.5, and while there were no issues with pistons, zombie pigmen encounter an error when teleporting from the Nether to the Overworld. Testing with the latest build of 1.21.4 shows everything works normally, so I believe this is a new bug in 1.21.5. The log for this error is attached.
Yes, the latest build of 1.21.4 works fine. However, I also tested the build of 1.21.5, and while there were no issues with pistons, zombie pigmen encounter an error when teleporting from the Nether to the Overworld. Testing with the latest build of 1.21.4 shows everything works normally, so I believe this is a new bug in 1.21.5. The log for this error is attached.
Open a new issue, because this is a different problem.
[10:26:07 ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Accessing poi chunk off-main, context=[thread=Region Scheduler Thread #0,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[672, -1120],world=world}], world=world, chunk_pos=[42, -70]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.world.entity.ai.village.poi.PoiManager.exists(PoiManager.java:338) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.server.level.ServerLevel.lambda$updatePOIOnBlockStateChange$21(ServerLevel.java:2343) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at io.papermc.paper.threadedregions.RegionizedTaskQueue$PrioritisedQu...
Folia has forgotten the position shift which is causing this issue
Folia has forgotten the position shift which is causing this issue
Thanks for your help, this is indeed the problem. The problem was solved after changing to get the block from coordinates
43c5365 Use chunk shift for position when queueing POI ... - Spottedleaf
06ace91 Use getHandleRaw when updating CraftMob handle - Spottedleaf
Yes, the latest build of 1.21.4 works fine. However, I also tested the build of 1.21.5, and while there were no issues with pistons, zombie pigmen encounter an error when teleporting from the Nether to the Overworld. Testing with the latest build of 1.21.4 shows everything works normally, so I believe this is a new bug in 1.21.5. The log for this error is attached.
https://github.com/PaperMC/Folia/commit/06ace91ba91c18451404516eced1a9c05f4e3f69
fixed tnt cross nether portal shouldn't break portal block
fixed Three-tier(and more) passenger canceled ride status after teleported in end gateway portal
https://mclo.gs/voJjfia#L1023
pl
[13:21:13 INFO]: ℹ Server Plugins (57):
[13:21:13 INFO]: Paper Plugins (5):
[13:21:13 INFO]: - CarbonChat, emotecraft, EnchantedBook, FancyNpcs, MoreFoWorld
[13:21:13 INFO]: Bukkit Plugins (52):
[13:21:13 INFO]: - ArmorStandEditor, AutoWhitelistRemove, CoreProtect, CoreProtectTNT, Craftorithm, DeluxeMenus, EasyPayments, Essentials, EssentialsSpawn, FlagsH
[13:21:13 INFO]: GSit, HeadDatabase, InventoryRollbackPlus, InvisibleFrames, LevelledMobs, LiteBans, LuckPerms, Maintenance, mclogs, MilkyPixelart
[13:21:13 INFO]: NBTAPI, OreAnnouncer, packetevents, PlaceholderAPI, PlasmoVoice, PlayerHeads, ProtocolLib, pv-addon-discs, pv-addon-groups, pv-addon-lavaplayer-lib
[13:21:13 INFO]: pv-addon-sculk, pv-addon-spectator, rpchat, spark, squaremap, squaremap-worldguard, squaremarker, StonecuttersPLUS, TAB, TabTPS
[13:21:13 INFO]: Terra, TWSAdmin, TWSCheck, TWSCore, UltimateAutoRestart, UltraCosme...
I got this same error on the latest commit for 1.21.5 https://mclo.gs/voJjfia#L1023
This implies that a entity ticking chunk was downgraded while doing the random tick, which doesn't really make sense to me.
I can't provide support for forks.
When plugins are being disabled there is no region context set for the shutdown thread. I don't really think any code using the regionized world data expects that.
This implies that a entity ticking chunk was downgraded while doing the random tick, which doesn't really make sense to me.
and how resolve this?
That does make sense. But it does leave a case of plugins being unable to cleanup stuff in the world
70f4f3a Add missing teleport logic from ServerPlayer#te... - Spottedleaf
Should not happen anymore on latest ver/1.21.4
This should be fixed on latest ver/1.21.4
I probably need to make more uses of the regionized world data tolerant to shutdown. There are still some things that you really can't do though, like load chunks.
A region only is stable when it is being ticked. That's why you really can't fetch all regions that exist. That's also why you can't just "do something per region." What you really should be doing is having these abilities affect an area, after which point you can easily build a system that detects overlap in these areas.
If the ability is tied to a player you should probably be using the player scheduler.
How can you detect overlap if there is no way to check what region you are on? There is no guarantee two locations will always be in the same region
How can you detect overlap if there is no way to check what region you are on? There is no guarantee two locations will always be in the same region
You always interact with the region scheduler, that's how?
One way to detect something like that could be getCurrentTick?
This implies that a entity ticking chunk was downgraded while doing the random tick, which doesn't really make sense to me.
I thought it's also happening on? the old version(1.21.4 etc.) but the older version usually copy that list when tick chunks
Im having the exact same issue. Hopefully we can get an update on this.
`[17:33:46] [ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler]: Region #25 centered at chunk [234, -377] in world 'world' failed to tick:
net.minecraft.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1836) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1666) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at java.base/java.lang.Thread.r...
Im having the exact same issue. Hopefully we can get an update on this. `[17:33:46] [ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler]: Region #25 centered at chunk [234, -377] in world 'world' failed to tick: net.minecraft.ReportedException: Exception ticking world at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1836) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1666) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32] at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32] at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32] at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?] at java.base/java.lang.Thread.run(Th...
i have this error
[22:59:11 ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #1 centered at chunk [-27, -26] in world '2B2TUA' failed to tick:
net.minecraft.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1836) ~[folia-1.21.5.jar:1.21.5-DEV-c9ed45f]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1666) ~[folia-1.21.5.jar:1.21.5-DEV-c9ed45f]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.5.jar:1.21.5-DEV-c9ed45f]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.5.jar:1.21.5-DEV-c9ed45f]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at java.base/java.lang.Thread.run(Thread.java:14...
This is caused by Folia moving chunk status updates possibly to the chunk queue. This potentially delays a chunk status downgrade until the chunk queue is processed, which happens during random world tick.
It's also possible that this happens on Paper but is far less likely due to the fact that it would require an off-thread ticket level update.
da0d7cd Temporary "fix" for https://github.com/PaperMC/... - Spottedleaf
https://github.com/PaperMC/Folia/commit/da0d7cd1beb8eb7b84a5210dcefa6ffb4cce7415 will reduce the chances of it happening but it is not a real fix
Latest 1.21.5 beta using folia
using anti xray too if that matters
[17:02:45 ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #1 centered at chunk [24, 3] in world 'world' failed to tick:
net.minecraft.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1836) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1666) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:407) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:418) ~[folia-1.21.5.jar:1.21.5-DEV-4f64c32]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:546) ~[concurrentutil-0.0.3.jar:?]
at...
Please don't bump random issues, that is not the latest version as of the time of posting, and that issue should to my understanding be mitigated in the latest build
Why not check if the chunk is null before running tickChunk? That way we can continue executing mid tick tasks, and prevent the throw.
- world.tickChunk(raw[i], randomTickSpeed);
+ LevelChunk chunk = raw[i]; if (chunk == null) continue; world.tickChunk(chunk, randomTickSpeed); // Folia - ensure non null
Because that would just be covering up the issue
Please run
paper debug chunks --asyncfrom the console (note: --async only works from the console), and provide the console output and the chunk debug. Please also note that the chunk debug will show all online players locations and all loaded chunks.Also, please run that from 1.21.3 - there are chunk system changes since 1.21.1.
Can confirm fixed in https://github.com/PaperMC/Folia/commit/2e7bc0721af95196c85500c7bb136aeea0bc12ce
Why not check if the chunk is null before running
tickChunk? That way we can continue executing mid tick tasks, and prevent the throw.- world.tickChunk(raw[i], randomTickSpeed); + LevelChunk chunk = raw[i]; if (chunk == null) continue; world.tickChunk(chunk, randomTickSpeed); // Folia - ensure non null
Please read the comment above the for loop. I wrote it there for a reason.
oh sorry, im new to github. but that isn't an excuse
[22:13:30] [Region Scheduler Thread #11/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Accessing poi chunk off-main, context=[thread=Region Scheduler Thread #11,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[1153, 604],world=world}], world=world, chunk_pos=[-2591, -2686]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.5.jar:1.21.5-DEV-da0d7cd]
at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.5.jar:1.21.5-DEV-da0d7cd]
at net.minecraft.world.entity.ai.village.poi.PoiManager.lambda$getInChunk$5(PoiManager.java:230) ~[folia-1.21.5.jar:1.21.5-DEV-da0d7cd]
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.base/java.util.stream.IntPipeline$1$1.accept(IntPipeline.java:180) ~[?:?]
at java.base/java.uti...
I have the same problem on my server
[17:38:26] [Region Scheduler Thread #4/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Accessing poi chunk off-main, context=[thread=Region Scheduler Thread #4,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[20992, -43992],world=world}], world=world, chunk_pos=[1312, -2750]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.world.entity.ai.village.poi.PoiManager.exists(PoiManager.java:338) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at net.minecraft.server.level.ServerLevel.lambda$updatePOIOnBlockStateChange$21(ServerLevel.java:2343) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e]
at io.papermc.paper.threadedregions.RegionizedT...
Villagers disappear when transported through a portal, as do other mobs (phantoms, armadillos, horses). If they are transported in a boat, the boat disappears along with them. This occurs both when traveling from the Nether to the Overworld and vice versa. Additionally, there was an issue where a horse could disappear during long-distance travel in the world
`[09:07:06] [Region Scheduler Thread #2/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread Region Scheduler Thread #2 failed main thread check: Accessing poi chunk off-main
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:51) ~[folia-1.21.4.jar:1.21.4-1-8af1aef]
at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.4.jar:1.21.4-1-8af1aef]
at net.minecraft.world.entity.ai.village.poi.PoiManager.getType(PoiManager.java:340) ~[folia-1.21.4.jar:1.21.4-1-8af1aef]
at net.minecraft.world.entity.ai.behavior.YieldJob...
useless command
Disagree, some backup plugins need this.
Villagers disappear when transported through a portal, as do other mobs (phantoms, armadillos, horses). If they are transported in a boat, the boat disappears along with them. This occurs both when traveling from the Nether to the Overworld and vice versa. Additionally, there was an issue where a horse could disappear during long-distance travel in the world
[09:07:06] [Region Scheduler Thread #2/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread Region Scheduler Thread #2 failed main thread check: Accessing poi chunk off-main java.lang.Throwable: null at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:51) ~[folia-1.21.4.jar:1.21.4-1-8af1aef] at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.4.jar:1.21.4-1-8af1aef] at net.minecraft.world.entity.ai.village.poi.PoiManager.getType(PoiManager.java:340) ~[folia-1.21.4.jar:1.21.4-1-8af1aef] at net.minecraft.world.entity...
run ./gradlew applyAllPatches first
Create new file Folia\folia-server\minecraft-patches\sources\net\minecraft\world\entity\npc\CatSpawner.java.patch
--- a/net/minecraft/world/entity/npc/CatSpawner.java
+++ b/net/minecraft/world/entity/npc/CatSpawner.java
@@ -36,7 +_,7 @@
if (level.hasChunksAt(blockPos.getX() - 10, blockPos.getZ() - 10, blockPos.getX() + 10, blockPos.getZ() + 10)) {
if (SpawnPlacements.isSpawnPositionOk(EntityType.CAT, level, blockPos)) {
if (level.isCloseToVillage(blockPos, 2)) {
- this.spawnInVillage(level, blockPos);
+ // this.spawnInVillage(level, blockPos);
} else if (level.structureManager().getStructureWithPieceAt(blockPos, StructureTags.CATS_SPAWN_IN).isValid()) {
this.spawnInHut(level, blockPos);
}
`./...
I have the same problem on my server
[17:38:26] [Region Scheduler Thread #4/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Accessing poi chunk off-main, context=[thread=Region Scheduler Thread #4,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[20992, -43992],world=world}], world=world, chunk_pos=[1312, -2750] java.lang.Throwable: null at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at net.minecraft.world.entity.ai.village.poi.PoiManager.exists(PoiManager.java:338) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at net.minecraft.server.level.ServerLevel.lambda$updatePOIOnBlockStateChange$21(ServerLevel.java:2343) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at io.papermc.paper.threade...
6c77040 Use getRandomLocalPlayer for CatSpawner - Spottedleaf
I have the same problem on my server
[17:38:26] [Region Scheduler Thread #4/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Accessing poi chunk off-main, context=[thread=Region Scheduler Thread #4,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[20992, -43992],world=world}], world=world, chunk_pos=[1312, -2750] java.lang.Throwable: null at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at net.minecraft.world.entity.ai.village.poi.PoiManager.exists(PoiManager.java:338) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at net.minecraft.server.level.ServerLevel.lambda$updatePOIOnBlockStateChange$21(ServerLevel.java:2343) ~[folia-1.21.5.jar:1.21.5-DEV-c299a7e] at io.papermc.paper.threade...
Villagers disappear when transported through a portal, as do other mobs (phantoms, armadillos, horses). If they are transported in a boat, the boat disappears along with them. This occurs both when traveling from the Nether to the Overworld and vice versa. Additionally, there was an issue where a horse could disappear during long-distance travel in the world
[09:07:06] [Region Scheduler Thread #2/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread Region Scheduler Thread #2 failed main thread check: Accessing poi chunk off-main java.lang.Throwable: null at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:51) ~[folia-1.21.4.jar:1.21.4-1-8af1aef] at net.minecraft.world.entity.ai.village.poi.PoiManager.getOrLoad(PoiManager.java:89) ~[folia-1.21.4.jar:1.21.4-1-8af1aef] at net.minecraft.world.entity.ai.village.poi.PoiManager.getType(PoiManager.java:340) ~[folia-1.21.4.jar:1.21.4-1-8af1aef] at net.minecraft...
3aba006 Use getLocalPlayers for PhantomSpawner - Spottedleaf
I don't see any diff on this PR.
Players being able to place blocks normally
Players being unable to place blocks at some locations, observed locations include
exact steps to replicate are unknown; assumption is some error in the behavior of pistons
AFCMS, BlueMap, *ChatMentions, LessSleep-Folia, LuckPerms, LuckPermsTab, ViaVersion
This server is running Folia version 1.21.4-DEV-dev/1.21.4@8af1aef (2024-12-14T12:28:31Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
Unknown version
Previous version: 1.21.1-DEV-88e0907 (MC: 1.21.1)
[downgraded from 1.21.5 due to crashes; see https://github.com/PaperMC/Folia/issues/363)
video displaying the issue: https://workupload.com/start/DndF7MrXdx7
You are using a version from last year
I don't know if it would be viable, but before the server shutdown call, create some kind of event like ServerWillShutdownEvent?
But if so, it would be more on the Paper side that would need to be added.
You are using a version from last year
The issue occured on both the main (1.21.4) and the test (1.21.5) server, just put the main server's version in the version field.
You are using a version from last year
The issue occured on both the main (1.21.4) and the test (1.21.5) server, I just put the main server's version in the version field.
But to see if it happens on 1.21.4, we would first have to see if it happens on the latest version of Folia 1.21.4. That's a December 2024 version!
@Spottedleaf, can you look into merging this one in the near future? It's a crucial fix for production.
[10:26:27 ERROR]: [io.papermc.paper.threadedregions.FoliaWatchdogThread] Tick region located in world 'world' around chunk '[578, -635]' has not responded in 10.650182044s:
[10:26:27 ERROR]: ------------------------------
[10:26:27 ERROR]: Current Thread: Region Scheduler Thread #3
[10:26:27 ERROR]: PID: 96 | Suspended: false | Native: false | State: WAITING
[10:26:27 ERROR]: Stack:
[10:26:27 ERROR]: java.base@21.0.7/jdk.internal.misc.Unsafe.park(Native Method)
[10:26:27 ERROR]: java.base@21.0.7/java.util.concurrent.locks.LockSupport.park(LockSupport.java:371)
[10:26:27 ERROR]: ca.spottedleaf.concurrentutil.lock.ReentrantAreaLock.lock(ReentrantAreaLock.java:169)
[10:26:27 ERROR]: ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkHolderManager.addTicketAtLevel(ChunkHolderManager.java:706)
[10:26:27 ERROR]: ca.spottedleaf.moonrise.patches.chunk_system.scheduling.ChunkHolderManager.addTicketAtLeve...
https://pastebin.com/2FFWnwMv
https://pastebin.com/jKpgBc9H
This is the only thing that occurs before the entire server restarts.
https://pastebin.com/2FFWnwMv https://pastebin.com/jKpgBc9H
This is the only thing that occurs before the entire server restarts.
We are on the latest commit: dfa3ca4
Would doing
/gamerule randomTickSpeed 0prevent this for now?
I "resolved" this issue (kind of like @Dueris said) by modifying the ServerChunkCache. This is by no means a proficient solution but I can't have my servers crashing. Things also have been stable for multiple days with said implementation:
// Paper end - rewrite chunk system
// Paper start - chunk tick iteration optimisations
private final ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom shuffleRandom = new ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom(0L);
private void iterateTickingChunksFaster() {
final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle foliaProfiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler(); // Folia - profiler
foliaProfiler.star...
I don't know what this PR does.
This issue creating the ghost blocks was fixed in later 1.21.4 builds.
https://pastebin.com/2FFWnwMv https://pastebin.com/jKpgBc9H
This is the only thing that occurs before the entire server restarts.
We are on the latest commit: dfa3ca4
Would doing
/gamerule randomTickSpeed 0prevent this for now?
Looks like I need to prioritise fixing the underlying issue.
No, the gamerule will not fix it.
https://pastebin.com/2FFWnwMv https://pastebin.com/jKpgBc9H
Это единственное, что происходит перед перезагрузкой всего сервера.
Мы находимся на последнем коммите: dfa3ca4
Будет ли делать/gamerule randomTickSpeed 0предотвратить это сейчас?Я «решил» эту проблему (вроде как @Duerisсказал) путем изменения
ServerChunkCache. Это ни в коем случае не эффективное решение, но я не могу допустить падения моих серверов. С этой реализацией все также было стабильно в течение нескольких дней:// Paper end - rewrite chunk system // Paper start - chunk tick iteration optimisations private final ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom shuffleRandom = new ca.spottedleaf.moonrise.common.util.SimpleThreadUnsafeRandom(0L); private void iterateTickingChunksFaster() { final ca.spottedleaf.leafprofiler.RegionizedProfiler.Handle foliaProfiler = io.papermc.paper.threadedregions.TickRegionScheduler.getProfiler(); // Folia - pro...
I "resolved" this issue (kind of like @Dueris said) by modifying the
ServerChunkCache. This is by no means a proficient solution but I can't have my servers crashing. Things also have been stable for multiple days with said implementation:
Could you post a .patch or .diff instead for easier implementation?
pastebin.com/2FFWnwMv pastebin.com/jKpgBc9H
This is the only thing that occurs before the entire server restarts.
We are on the latest commit: dfa3ca4
Would doing/gamerule randomTickSpeed 0prevent this for now?Looks like I need to prioritise fixing the underlying issue. No, the gamerule will not fix it.
I am a player on a server with this issue and I can confirm; the gamerule appears to have fixed the issue. However, I am not a developer there so I cannot really explain beyond this. Quantura will be able to.
/gamerule locatorBar true no working 1.21.6
/gamerule locatorBar true no working 1.21.6
/gamerule locatorBar true no working 1.21.6
clear Folia
This server is running Folia version 1.21.6-DEV-ver/1.21.6@3ef3a4e (1970-01-01T00:00:00Z) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
You are running the latest version
No response
If you check the 1.21.6 commit (2397f04f29a1e7e904bf8fd805b99119441b4a7f) you'll find a note saying:
Need to implement waypoints correctly
I'm guessing that because they aren't confined to a small local area that they need special multi-region handling which has not been implemented yet.
You'll have to wait for @Spottedleaf to implement it. 1.21.6 is not long out, be patient.
Thread failed main thread check:
Thread failed main thread check:
[20:35:34 INFO]: ℹ Server Plugins (9):
[20:35:34 INFO]: Bukkit Plugins:
[20:35:34 INFO]: - ArmorStand-Limiter, CommandWhitelist, FarmControl, Lootin, LuckPerms, MiniMOTD, PlaceholderAPI, SpawnerProtect, TAB
This server is running Folia version 1.21.6-DEV-ver/1.21.6@3ef3a4e (1970-01-01T00:00:00Z) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
You are running the latest version
No response
map data do not flush to disk with autosave
Playerdata and chunk data are saved properly to disk with autosave, but map data only save to disk on proper shutdown. Map data can be saved with autosave on Paper. If the folia server crashes, all the map data will be lost.
It can be reproduce everytime as server crash or unexpected power off
None
Folia version 1.21.4-DEV-dev/hard-fork@cd49d65 (1970-01-01T00:00:00Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)
No response
I don't know what this PR does.
This PR resolves a prevalent issue where crafting slots don't drop items upon death and are kept instead.
pl
[05:13:34 INFO]: ℹ Server Plugins (59):
[05:13:34 INFO]: Paper Plugins (5):
[05:13:34 INFO]: - CarbonChat, emotecraft, EnchantedBook, FancyNpcs, MoreFoWorld
[05:13:34 INFO]: Bukkit Plugins (54):
[05:13:34 INFO]: - AntiHealthIndicator, ArmorStandEditor, AutoWhitelistRemove, AxInventoryRestore, BreweryX, CoreProtect, CoreProtectTNT, Craftorithm, DeluxeMenus, EasyPayments
[05:13:34 INFO]: Essentials, EssentialsSpawn, fast-leaf-decay, FlagsH, GSit, HeadDatabase, InvisibleFrames, LevelledMobs, LiteBans, LuckPerms
[05:13:34 INFO]: Maintenance, mclogs, MilkyPixelart, OreAnnouncer, packetevents, PlaceholderAPI, PlasmoVoice, PlayerHeads, ProtocolLib, pv-addon-discs
[05:13:34 INFO]: pv-addon-groups, pv-addon-lavaplayer-lib, pv-addon-sculk, pv-addon-spectator, rpchat, spark, squaremap, squaremap-worldguard, squaremarker, StonecuttersPLUS
[05:13:34 INFO]: TAB, Terra, TWSAdmin, TWSCheck, TWSCore, UltimateAutoRe...
Should be called for nether portals
Not called anymore
Listen to the EntityPortalReadyEvent
[16:40:03 INFO]: ℹ Server Plugins (3):
[16:40:03 INFO]: Paper Plugins:
[16:40:03 INFO]: - Commander, Tweaks, Worlds
[16:40:19 INFO]: This server is running Folia version 1.21.6-DEV-ver/1.21.6@3ef3a4e (1970-01-01T00:00:00Z) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
You are 3 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.6-27-5edcf6d (MC: 1.21.6)
The event was called normally in 1.21.5
I don't know what this PR does.
This PR resolves a prevalent issue where crafting slots don't drop items upon death and are kept instead.
Use xcarry of inventory tweaks of meteor client can constantly reproduce that
1.21.5 Folia
[11:07:27 ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Cannot asynchronously load chunks, context=[thread=Region Scheduler Thread #1,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-17, -5],world=World_the_end}], world=World_the_end, chunk_pos=[77, 0]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.5.jar:1.21.5-DEV-dfa3ca4]
at net.minecraft.server.level.ServerChunkCache.syncLoad(ServerChunkCache.java:103) ~[folia-1.21.5.jar:1.21.5-DEV-dfa3ca4]
at net.minecraft.server.level.ServerChunkCache.getChunkFallback(ServerChunkCache.java:156) ~[folia-1.21.5.jar:1.21.5-DEV-dfa3ca4]
at net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:330) ~[folia-1.21.5.jar:1.21.5-DEV-dfa3ca4]
at net.minecraft.world.level.Level.getChunk(Level.java:1093) ~[folia-1.21.5.jar:1.```...
Fix generate tick report data
After some more testing, I noticed the EntityPortalReadyEvent was never called. It just seemed like it, since my server was misconfigured and worked like it actually was handling the event
Display player direction in XP
The direction indicator in the XP bar isn't showing.
The direction indicator in the XP bar isn't showing.
[22:44:14 INFO]: Bukkit Plugins:
[22:44:14 INFO]: - AutoTreeChop, BetterRTP, Chunky, CoreProtect, Essentials, EssentialsSpawn, GSit, LiteSignIn, LuckPerms, PlaceholderAPI
[22:44:14 INFO]: TAB, TrChat, Vault, ViaBackwards, ViaVersion
This server is running Folia version 1.21.6-DEV-ver/1.21.6@ac8f05f (1970-01-01T00:00:00Z) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
No response
This allows to get an entity's (team) name without having to switch thread context
[10:04:30] [Region Scheduler Thread #0/ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #-1 centered at chunk null in world 'null' failed to tick:
java.lang.UnsupportedOperationException: Configuration mode is not supported in its current state
at net.minecraft.server.network.ServerCommonPacketListenerImpl.onDisconnect(ServerCommonPacketListenerImpl.java:97) ~[folia-1.21.7.jar:1.21.7-DEV-0b53ab4]
at net.minecraft.server.network.ServerConfigurationPacketListenerImpl.onDisconnect(ServerConfigurationPacketListenerImpl.java:73) ~[folia-1.21.7.jar:1.21.7-DEV-0b53ab4]
at net.minecraft.network.Connection.handleDisconnection(Connection.java:923) ~[folia-1.21.7.jar:1.21.7-DEV-0b53ab4]
at io.papermc.paper.threadedregions.RegionizedServer.tickConnections(RegionizedServer.java:376) ~[folia-1.21.7.jar:1.21.7-DEV-0b53ab4]
at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:325) ~[folia-1.21.7.jar:1.21.7-DEV-0b53ab4]```...
After updating from 1.21.6 to 1.21.7, my server also shut down unexpectedly. Right before the error message appeared, a player disconnected simultaneously. This is the only clue I can provide
have player exit message
no player exit message
1.player leave server
2.no exit message
[13:50:03 INFO]: ℹ Server Plugins (25):
[13:50:03 INFO]: Paper Plugins (3):
[13:50:03 INFO]: - CarbonChat, FancyHolograms, HuskHomes
[13:50:03 INFO]: Bukkit Plugins (22):
[13:50:03 INFO]: - BedrockPlayerSupport, BlockLocker, CoreProtect, floodgate, GSit, LightSuicide, LiteSignIn, LuckPerms, MapModCompanion, packetevents
[13:50:03 INFO]: PlaceholderAPI, PlayerHeads, ProtocolLib, QuickShop-Hikari, SkinsRestorer, TAB, Teh, Towny, Vault, ViaBackwards
[13:50:03 INFO]: ViaVersion, XConomy
[13:54:21 INFO]: This server is running Folia version 1.21.7-DEV-ver/1.21.7@6cc7f5b (1970-01-01T00:00:00Z) (Implementing API version 1.21.7-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.7-15-0cadaef (MC: 1.21.7)
I removed all the plugins and st...
Duplicate of https://github.com/PaperMC/Paper/issues/12784 in paper, upstream just needs to be updated for this to be fixed
On large SMP servers, players may go AFK for a considerable amount of time to farm items from their mob farms. Keeping these players in the standard consideration for region creation seems a bit unnecessary as these regions are sometimes far from other players. or otherwise can get unexpectedly merged with other regions and drastically impact performance.
If there was an API you could use on a Player to put them into a sort of region group, where all players in that group are prioritized to be put on the same "region" to be ticked together, and as a result only affect the performance of others also AFKing, that could be nice. This could also be helpful for giving something like giving players who are engaged in combat, low on health, etc, a priority region for higher TPS to help prevent their death.
Of course, this API wouldn't "force" the players to be grouped into a specific region, it would j...
ServerPreShutdownEvent would be good for cleanup for sure, though yes, it should exist in both Paper and Folia if added. Probably fired after Players are effectively "disconnected" (on folia, still in world, but on Paper iirc they'd be disconnected already?), though the specifics of that could be pretty easily documented and handled per platform by devs
players are booted from the server long after plugins disable on paper, and changing that behavior requires a whole lot of testing as it's fairly easy for stuff to get lost if you start changing the semantics of shutting down which brings in a lot of edge case issues
@electronicboy I'm not suggesting making a change, I was just making an assertion that's probably wrong. AFAIK on Folia, players are only removed from the world late into shutdown, idk what it is on Paper.
Same problem here. I've disconnected when my client said joining world. Here is a clip of the server crashing when I'm doing that:
https://cdn.bypixel.dev/u/leQ5Bl.mp4
This is ver
Expected behavior
Players should be able to join the server at any time.
Observed/Actual behavior
There is a very odd bug with the new scheduler where randomly during server uptime, Folia wont allow any players to join after the bug happens. It can happen within an hour or within 3 days, it seems to be random.
This is not plugin-induced as reverting to hard-fork branch fixes the problem. There are no errors in console (both backend and velocity) and everything seems fine, but no new players can join the server.Steps/models to reproduce
- Compile the folia jar from new-scheduler branch.
- Have 200+ players (seems to happen more frequently with higher playercounts).
- Wait until the bug happens.
Plugin and Datapack List
.
Folia version
Latest version of new-scheduler branch as of this writing.
Other
The only fix for now is reverting to hard-fork branch. Temporary solution is to...
just run server on folia 1.21.6 (maybe work on 1.21.7)
[21:34:21 INFO]: ℹ Server Plugins (63):
[21:34:21 INFO]: Paper Plugins (6):
[21:34:21 INFO]: - CarbonChat, ChatDisplay, emotecraft, EnchantedBook, FancyNpcs, MoreFoWorld
[21:34:21 INFO]: Bukkit Plugins (57):
[21:34:21 INFO]: - AntiHealthIndicator, ArmorStandEditor, AutoWhitelistRemove, AxInventoryRestore, BreweryX, CoreProtect, CoreProtectTNT, Craftorithm, DeluxeMenus, EasyPayments
[21:34:21 INFO]: Essentials, EssentialsSpawn, fast-leaf-decay, FlagsH, GSit, HeadDatabase, InteractiveSigns, InvisibleFrames, LevelledMobs, LiteBans
[21:34:21 INFO]: LuckPerms, Maintenance, mclogs, MilkyPixelart, NBTAPI, OreAnnouncer, packetevents, PlaceholderAPI, PlasmoVoice, PlayerHeads
[21:34:21 INFO]: ProtocolLib, pv-addon-discs, pv-addon-groups, pv-addon-lavaplayer-lib,...
Fix above works https://github.com/LuminolMC/Luminol/commit/8c5f36eda46642964261a5abe1f2ff2afc3f655a
Plase add this to folia
All online players should receive messages
Some of player didnt receive broadcast message
Bukkit.broadcastMessage("test1 ");
or
Bukkit.broadcast(Component.text("test2 "));
a broadcast test plugin
1.21.7 latest version
No response
The player should not kick
Sometimes players get kicked with this error. The player was afk.
I noticed that the operator is not kicking
Start the server folia 1.21.6 + velocity.
join the server(not OP)
Wait
Paper plugins (4):
I built a mobswitch and stacked 140 Warden mob in it. I'm the only player on the server and I'm using a nether portal chunk loader to keep it loaded.
Mob spawning should be disabled when mobcap is reached
However, when I move to other areas, mobs continue to spawn despite the mobswitch being active.
This appears to be related to how Folia handles mob spawning calculations across different regions/threads, as the mobswitch works correctly on Paper servers.
<img width="2560" height="1369" alt="Image" src="https://github.com/user-attachments/assets/d33c9f21-8e81-4a4a-8ff5-506251697240" />
open mobswitch and teleport 100,000 blocks away
no
1.21.6
No response
that's not a bug ! every region have dedicated mobcap ! your mobswitch must work only on 1 region
[12:44:28] [Region Scheduler Thread #10/ERROR]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundContainerClosePacket@1b2e8eca, suppressing error
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10
at java.base/java.util.ArrayList.add(ArrayList.java:484) ~[?:?]
at java.base/java.util.ArrayList.add(ArrayList.java:496) ~[?:?]
at net.minecraft.world.inventory.TransientCraftingContainer.onOpen(TransientCraftingContainer.java:30) ~[folia-1.21.6.jar:1.21.6-DEV-e4b0ae9]
at net.minecraft.world.inventory.AbstractContainerMenu.transferTo(AbstractContainerMenu.java:76) ~[folia-1.21.6.jar:1.21.6-DEV-e4b0ae9]
at org.bukkit.craftbukkit.event.CraftEventFactory.handleInventoryCloseEvent(CraftEventFactory.java:1465) ~[folia-1.21.6.jar:1.21.6-DEV-e4b0ae9]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClose(ServerGamePacketListenerImpl.java:2983) ~[folia-1.21.6.jar:1.21.6-DEV-e4b0ae9]
at net.minecraft.```...
Correct, but this has not been fixed in 1.21.7 or .8, so I feel like this issue remains relevant
I feel that this just goes into the general premise of not sharing local state across contexts, I don't think that there will be much interest in trying to protect this specific backing collection when the entire inventory system is really not designed for concurrent access. This is likely an issue for plugins to resolve
What tick is this being run on? A region tick or the global tick? And if it's the region tick, are you(the player) in a different region or the same region?
the problem is relevant in version 1.21.6 and breaks farms
pl
[14:54:34 INFO]: ℹ Server Plugins (62):
[14:54:34 INFO]: Paper Plugins (5):
[14:54:34 INFO]: - CarbonChat, emotecraft, EnchantedBook, FancyNpcs, MoreFoWorld
[14:54:34 INFO]: Bukkit Plugins (57):
[14:54:34 INFO]: - AntiHealthIndicator, ArmorStandEditor, AutoWhitelistRemove, AxInventoryRestore, BreweryX, Chunky, CoreProtect, CoreProtectTNT, Craftorithm, DeluxeMenus
[14:54:34 INFO]: EasyPayments, Essentials, EssentialsSpawn, FlagsH, GSit, HeadDatabase, InteractiveSigns, InvisibleFrames, LiteBans, LuckPerms
[14:54:34 INFO]: Maintenance, mclogs, MilkyPixelart, NBTAPI, OreAnnouncer, packetevents, PlaceholderAPI, PlasmoVoice, PlayerHeads, ProtocolLib
[14:54:34 INFO]: pv-addon-discs, pv-addon-groups, pv-addon-lavaplayer-lib, pv-addon-sculk, pv-addon-spectator, rpchat, ShapelessPortals, spark, squaremap, squaremap-worldguard
[14:54:34 INFO]: squaremarker, StonecuttersPLUS, TAB, Terra, ToolStats, TWSAdmin,...
What tick is this being run on? A region tick or the global tick? And if it's the region tick, are you(the player) in a different region or the same region?
public boolean onCommand(@NotNull CommandSender sender,
@NotNull Command cmd,
@NotNull String label,
String @NotNull [] args) {
Bukkit.broadcastMessage("test 1");
Bukkit.getServer().getGlobalRegionScheduler().run(Ranmc.getInstance(), _ -> {
Bukkit.broadcastMessage("test 2");
});
Bukkit.getServer().getAsyncScheduler().runNow(Ranmc.getInstance(), _ -> {
Bukkit.broadcastMessage("test 3");
});
<img width="1066" height="130" alt="Image" src="https://github.com/user-attachments/assets/35bfe64f-3a7e-4ddb-a4cc-cd2190d7bf7b" />
Are you sure the player has https://jd.papermc.io/paper/1.21.8/org/bukkit/Server.html#BROADCAST_CHANNEL_USERS bukkit.broadcast.user permission, as referenced in breadcast's javadocs?
<img width="778" height="90" alt="Image" src="https://github.com/user-attachments/assets/ff8176ff-8499-499b-bcef-cce67d7315e6" />
for (Player player : Bukkit.getOnlinePlayers()) {
Bukkit.broadcastMessage(player.getName() + " " + player.hasPermission(BROADCAST_CHANNEL_USERS));
}
Can you try Bukkit.getServer().sendMessage() if it would fit you as a temporary replacement until this will be fixed?
Bukkit.getServer().sendMessage() it work!
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
It would...
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.
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
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 w...
yes, it bites my butt
When killing a mob with a wither's head flying through the portal, a wither rose drops out.
When killing a mob with a wither's head flying through the portal, a wither rose NOT drop out.
Build a wither rose farm using portals or kill a mob with a wither's head flying through the portal.
I tested it on a server without plugins and datapacks.
This server is running Folia version 1.21.6-6-ver/1.21.6@e4b0ae9 (2025-06-29T03:17:11Z) (Implementing API version 1.21.6-R0.1-SNAPSHOT)
This bug does not exist on the Paper core, it is a bug of the Folia core. I checked it on the Paper version 1.21.7.
Perhaps if the head flies from one region to another, the same behavior will occur.
Does this issue occur on Folia 1.21.8?
@Dueris I checked it, the bug still exists on Folia 1.21.8.
When a player enters a natural end portal in the overworld they are teleported to the end.
No message, no error, no teleport action. Unsure the reason why the event is not firing.
No event fired.
[21:36:15 INFO]: ℹ Server Plugins (69):
[21:36:15 INFO]: Paper Plugins (12):
[21:36:15 INFO]: - CrazyCrates, EconomyShopGUI-Premium, ExtraGreetings, FancyHolograms, FancyNpcs, FeatherMorph, Nexo, NexoAddon, ServiceIO, UltimateMobCoins
[21:36:15 INFO]: Worlds, ZealousChat
[21:36:15 INFO]: Bukkit Plugins (57):
[21:36:15 INFO]: - ajLeaderboards, AuraSkills, Aurora, AuroraCollections, AuroraLevels, AuroraQuests, AxAFKZone, AxEnvoy, AxGraves, AxPlayerWarps
[21:36:15 INFO]: AxRewards, AxTrade, AxVaults, BetterModel, BetterRTP, BreweryX, ChunkEntityLimiter, Chunker, CrazyAuctions, CrazyEnchantments
[2```...
Never mind, after a brain fart I found that the worlds plugin was blocking it and I had to enable linking....
In the current spark report, we can see that each region thread has its own ID (just add --not-combined)
<img width="576" height="132" alt="Image" src="https://github.com/user-attachments/assets/6bbe45dc-7244-4a13-96ce-fd4c817ac8a6" />
But we cannot know which region the thread belongs to, this is very inconvenient for viewing the analysis report of a single region, we can only guess (maybe there is another way but idk)
It would be nice if the thread id to every region could be added to the /tps command output
This allows the server owner to know which thread are used in each region, and then use spark to look the analysis report of the region
Well, I don't know, but add id to tps output should be the easiest way
No response
are regions bound to threads? I'm not sure that that is the case
They are not bound to threads.
That's what I thought, can't really show anything useful here as it's just going to hop around threads
Yea, not only that but other regions can be ticked on that same thread aswell
However, it is also helpful to view the spark report and analyze performance issues if you can see which thread is currently used in region
But if the region hops between threads, how will this be manageable? Lets say it hops between threads every tick, with another 30 regions doing the same, how would you be able to differentiate between the region you are tracking and the other regions? And keep in mind, regions dont have dedicated threads, meaning other regions still can share the same thread as the region you are tracking, meaning even if the region is staying on 1 single thread for some reason(like a 1/billion chance), then the performance report will be merged with the other regions being ticked on that thread.
Its just not reliable. If you want to track performance issues, isolate the region off-production, like copy the world and track it in a development server where that region is the only region loaded.
Maybe instead you could attach your own profiler to that specific region ticking,
there is nothing much deeper that a spark profiler will show, so if your plan is to just be able to monitor a region do that,
usually performance hits will show up on the spark profiler no matter what.
Maybe instead you could attach your own profiler to that specific region ticking,
there is nothing much deeper that a spark profiler will show, so if your plan is to just be able to monitor a region do that, usually performance hits will show up on the spark profiler no matter what.
Folia already has a profiler for each threaded region's profiling
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.
Learn.
On Friday, August 8th, 2025 at 15:34, TheRealLifeBasti @.***> wrote:
TheRealLifeBasti left a comment (PaperMC/Folia#387)
But i can't code.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: @.***>
This bug is incredibly frustrating on servers that utilize map-based artwork. I'm really hoping that it can be addressed or some workaround can be suggested.
This PR includes methods to get MSPT per region.
I tried using the same naming as in Bukkit but adapted for the region logic like the TPS API was.
This re-uses the same logic as CraftServer#getTPSFromRegion and javadocs, which means a possible improvement would be to make a separate function to get the RegionScheduleHandle to re-use in both. However, I decided against this approach since idk if that would make it less likely of getting merged.
This API is useful for monitoring tools that take samples in regular intervals.
omgg thank you, do i need to compile it myself?
[21:13:23] [Region Scheduler Thread #16/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Cannot asynchronously load chunks, context=[thread=Region Scheduler Thread #16,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-962, 144],world=world}], world=world, chunk_pos=[-640, 88]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.server.level.ServerChunkCache.syncLoad(ServerChunkCache.java:103) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.server.level.ServerChunkCache.getChunkFallback(ServerChunkCache.java:156) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:330) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.level.Level.getChunk(Level.java:1028) ~[lsfolia-1.21.8.jar:```...
Upon death, all items are dropped.
When you put items in your inventory inside crafting slots and die (such as with /kill), the items inside crafting slots will be kept upon death and not dropped.
None.
Tested with latest Folia from https://github.com/PaperMC/Folia/commit/7a1c5c7c7c86a0071654e03d7bf82120d113ef38
No response
[00:37:09] [Region Scheduler Thread #11/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Accessing entity state off owning region's thread, context=[thread=Region Scheduler Thread #11,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-677, 671],world=world}], entity={root=[{type=Skeleton,id=10223612,uuid=09433542-54bb-4e92-aef8-7a5cab04721e,pos=(-11,164.768,63.000,10,739.244),mot=(-0.174,-0.078,-0.077),aabb=AABB[-11165.067996276393, 63.0, 10738.944177231802] -> [-11164.467996252552, 64.99000000953674, 10739.544177255644],removed=null,has_vehicle=false,passenger_count=0], vehicle=[{null}], passengers=[]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:97) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at org.bukkit.craftbukkit.entity.CraftSkeleton.getHandle(CraftSkeleton.java:15) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at org.bukkit```...
Please do not share links to random jar files through here.
When using the teleport command, rotation (pitch and yaw) was not preserved when teleporting to an entity, or in any situation where it wasn't explicitly specified in the command parameters. The first commit fixes that.
The second commit adds back PlayerChangedWorldEvent to fire after teleportAsync is called, if the entity is a player and they are teleporting to a new world.
I tried to make a spigot plugin compatible with Folia, but the world creation failed and the corresponding worlds content was explicitly added in bukkit.yml, but I couldn't do it
What I expected to see: the world is correctly generated
World folder generated but not initialized
no
only my test plugin
version
[16:09:15 INFO]: Checking version, please wait...
[16:09:16 INFO]: This server is running Folia version 1.21.8-5-ver/1.21.8@7a1c5c7 (2025-09-04T12:50:30Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.4-6-b785bcc (MC: 1.21.4)
No response
World creation is not officially supported on folia yet
The official recommended way of creating worlds is through data packs
World creation is not officially supported on folia _yet_folia 尚未正式支持世界创建 The official recommended way of creating worlds is through data packs官方推荐的创建世界的方式是通过数据包
oh thank you i will learn ( •̀ ω •́ )✧
[02:43:27] [Region Scheduler Thread #7/WARN]: Unknown target reason, please report on the issue tracker
java.lang.Exception: null
at net.minecraft.world.entity.Mob.setTarget(Mob.java:283) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.Mob.setTarget(Mob.java:271) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.monster.Shulker.teleportSomewhere(Shulker.java:415) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.monster.Shulker.hitByShulkerBullet(Shulker.java:464) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.monster.Shulker.hurtServer(Shulker.java:449) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.Entity.hurtOrSimulate(Entity.java:2308) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.projectile.ShulkerBullet.onHitEntity(ShulkerBullet.java:306) ~[lsfolia-1.21.8.jar:1.21.8-DEV-e49fe2f]
at net.minecraft.world.entity.projectile```...
I don't think this is the right solution, because here we have 1 tick delay after the player has changed world
Paper allows for enabling JMX monitoring using the enable-jmx-monitoring flag. This is very helpful for setting up dashboards to externally view the performance of the server. However, in Folia, this has been disabled. These MBeans are still exposed, though, resulting in consistently empty or 0 values.
Since the existing metrics averageTickTime and tickTimes aren't helpful as global fields anymore, it would be neat to have data available for region information by editing net\minecraft\util\monitoring\jmx\MinecraftServerStatistics.java to include TabularData metrics, with a row for each region and columns for the region identifier, average tick rate, and also some other helpful things in folia-server\src\minecraft\java\io\papermc\paper\threadedregions\TickRegions$RegionStats like entityCount, playerCount, and chunkCount.
Some plugins try to expose th...
The map created by the player lives forever and happily
Players report that cards often break and become "unknown cards"
i do not have 100% repro, but maps often breaks in time, maybe hard reset is trigger (server power lost)
Server Plugins (21):
Paper Plugins (1):
This server is running Folia version 1.21.8-2-ver/1.21.8@4ed5b66 (2025-08-10T00:33:31Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
You are 3 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.4-DEV-8af1aef (MC: 1.21.4)
I have this problem over year, folia runs on 1...
Maybe because this change causes the auto save to no longer work
Found that running the following caused maps to save
I am quite new to working with Folia so this may have unforseen implications regarding multithreading. It will probably be safer to run them inside the .globalRegionScheduler()
Kotlin
(Bukkit.getServer() as CraftServer).server.overworld().dataStorage.save(true)
Java
((CraftServer) Bukkit.getServer()).getServer().overworld().getDataStorage().save(true);
Kotlin
(Bukkit.getServer() as CraftServer).server.overworld().dataStorage.saveAndJoin()
Java
((CraftServer) Bukkit.getServer()).getServer().overworld().getDataStorage().saveAndJoin();
Likely to be caused by the mentioned patch file, although the original reason for disabling incremental saving in this circumstance seems to have been lost to time as the file has been renamed numerous times.
My temporary solution is to revert the line change mentioned above and add the following to the top of saveIncrementally()
if (doFull) {
this.getChunkSource().getDataStorage().scheduleSave();
return;
}
Similarly, only save DimensionDataStorage to avoid some unexpected problems
Also, if you get ConcurrentModificationException, you can add sync lock in collectDirtyTagsToSave() when looping this.cache
It has been running on my server for a few weeks, and the map data is auto saved normally. I haven't encountered any problems yet, but as mentioned above this is just my temporary solution
I think this issue is possibly related to this one. Hoping to see this be addressed soon by the developers as it's very frustrating.
When the /gamerule spawnRadius is 0 and /setworldspawn ~ ~ ~ is set to another coordinate than the normal starter World Spawn the players with no respawnpoint should respawn on the exact Block wich will be set with /setworldspawn ~ ~ ~. But if the /gamerule spawnRadius is 0 players respawn at the first world spawn.
If you change the /setworldspawn ~ ~ ~ and do /gamerule spawnRadius 0 you should spawn at the befor set world spawnpoint.
When /gamerule spawnRadius is 0 the game spawns you somewhere else than the set Respawn Point.
When /gamerule spawnRadius is 1 or more the game spawns you at the world spawnpoint wich was changed bevor.
Occurs on 1.21.8-DEV-ver/1.21.8@612d9bd with a minimal plugin list:
[17:54:21 INFO]: ℹ Server Plugins (11):
[17:54:21 INFO]: Paper Plugins (3):
[17:54:21 INFO]: - BlueSlimeCore, FancyHolograms, MiniPlaceholders
[17:54:21 INFO]: Bukkit Plugins (8):
[17:54:21 INFO]: - CombatLogX, FasterCrystals, GlowingTest, PacketBoard, packetevents, ProtocolLib, ViaBackwards, ViaVersion
Notably also only occured to us with Happy Ghasts. From looking at the code, I'm guessing happy ghasts move too quickly
@Override
public void travel(Vec3 travelVector) {
float f = (float)this.getAttributeValue(Attributes.FLYING_SPEED) * 5.0F / 3.0F;
this.travelFlying(travelVector, f, f, f);
}
The hitbox in which to look for entities to collide with is resized to be big enough to fit the travelVector, but this ends up being outside of the Region ticking that Ghast. However it appears to me it would require Absurdly high speeds for the hitboxes to expand this rapidly, in the provided logs i...
[13:44:05] [lpx-packet-logger-0/INFO]: [LPX] heu_gm sent PLAYER_INPUT (37.020ms) (20 bytes) [input=Input[forward=false, backward=false, left=false, right=false, jump=false, shift=false, sprint=true], STREAM_CODEC=net.minecraft.network.codec.StreamCodec$7@3cdd47a0]
[13:44:05] [Region Scheduler Thread #0/ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Cannot move entity off-main, context=[thread=Region Scheduler Thread #0,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-47, -12],world=world}], world=world, chunk_pos=[-153, -63]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.4.jar:1.21.4-6-b785bcc]
at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup.checkThread(ServerEntityLookup.java:39) ~[folia-1.21.4.jar:1.21.4-6-b785bcc]
at ca.spottedleaf.moonrise.patches.chunk_system.le...
how to fix it, crash server
You are using a version of the game that is too old (1.21.4), you must update to 1.21.8 which is currently the latest, because you will probably have no support because previous versions are no longer supported
This is also happening on our sever as well, we have pretty much the same setup as Teslicek's server, here is out stack trace as well, I think they are the same.
From what I gathered our cause was from when a player logged into to the server this would happen and the server would crash
``
[07:32:47 ERROR]: [ca.spottedleaf.moonrise.common.util.TickThread] Thread failed main thread check: Cannot add entity off-main thread, context=[thread=Region Scheduler Thread #0,class=io.papermc.paper.threadedregions.TickRegionScheduler$TickThreadRunner,region={center=[-7, -2],world=world}], world=world, chunk_pos=[255, -151]
java.lang.Throwable: null
at ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread(TickThread.java:88) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
at ca.spottedleaf.moonrise.patches.chunk_system.level.entity.server.ServerEntityLookup.checkThread(ServerEntityLookup.java:52) ~[folia-1.21.8.jar:1.21.8-5-7a1c5c7]
at ca.spottedleaf.moonrise.patches.chunk_syst...
These sorts of errors generally occur when something teleports the player in an place in which teleporting the player causes the server to trip up
Hello,
For the use case of running a single small map server, I would like to be able to decrease the region size via the config, in order to increase region tps when there is a lot of player/entity.
Even if it incurrs disabling vanilla features in order to be able to run smaller region.
This will increase usability of Folia for concentrated player numbers across few chunks (e.g: for gamemode such as Factions)
Thanks
A regionSize parameter, and if any, other relevent parameters.
Also if needed, a way to disable vanilla features that could have an impact on smaller region size.
Manually modifying regionizer implementation variables.
No response
Replied on discord
<img width="1259" height="127" alt="Image" src="https://github.com/user-attachments/assets/ac1e6e18-f35b-4d1e-90e4-0e9d605e06f7" />
I expected to see that my note block on the server would produce a redstone signal.
In fact, the notes block does not work on my server, despite the fact that I enabled the note block update in the configuration, and I also have vanilla redstone enabled.
https://drive.google.com/file/d/1JUKD4PbkYq8TTcMFclVHsIl0E_mLyMM2/view?usp=sharing
<img width="986" height="325" alt="Image" src="https://github.com/user-attachments/assets/09b15f1e-0a31-4e05-a3bf-45d564abb1f8" />
<img width="890" height="137" alt="Image" src="https://github.com/user-attachments/assets/48dde4b7-c229-46fb-92df-b5364543c03c" />
No response
https://pastebin.com/raw/BtnpEjZM
Since paste.gg was down, I'm sending it by PasteBin.
<img width="1312" height="444" alt="Image" src="https://github.com/user-attachments/assets/4254e619-bea5-4199-84fb-ccf19e51377c" />
It occurred when I joined the server.
However, it also happens randomly while playing even after joining.
This server is running Folia version 1.21.8-5-ver/1.21.8@7a1c5c7 (2025-09-04T12:50:30Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
No response
I'm not sure what problem is, but you should start with update on latest build (6, 1.21.8-6-ver/1.21.8@612d9bd)
Would need a jstack in order to see what the entire JVM is doing, given that it looks like something has potentially locked itself up
Next time it happens, I'll check the jstack.
Should I send the results?
The error recurred, so I captured a jstack.
No deadlocks were found, but multiple threads were waiting for locks to be released, so I'm sending part of the results.
Let me know if you need the full results.
StampedLock https://pastebin.com/raw/sxXB3Tx5
ReetrantAreaLock https://pastebin.com/raw/5m1N5Yfu
Region #~ centered at chunk [~, ~] in world 'world_nether' failed to tick:
net.minecraft.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1878) ~[server-1.21.8.jar]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1693) ~[server-1.21.8.jar]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:409) ~[server-1.21.8.jar]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:437) ~[server-1.21.8.jar]
a```...
Folia saves map data per 5 minutes by default. You can change auto-save in bukkit.yml
pl
[22:46:28 INFO]: ℹ Server Plugins (23):
[22:46:28 INFO]: Paper Plugins (1):
[22:46:28 INFO]: - AuthMeVelocity
[22:46:28 INFO]: Bukkit Plugins (22):
[22:46:28 INFO]: - AnarchyExploitFixes, AntiopByChaLiuCore, AuthMe, AxGraves, BetterRTP, ChatFilter, CoreProtect, IllegalStack, LuckPerms, Matrix
[22:46:28 INFO]: NBTAPI, packetevents, PlaceholderAPI, Plan, PlayerCulling, PlayerViewDistanceController, PvPManager, SkinsRestorer, TAB, TPA
[22:46:28 INFO]: ViaBackwards, ViaVersion
[22:46:28 INFO]: Command execution stopped due to limit (executed 1 commands)
No response
version
[22:46:08 INFO]: Checking version, please wait...
[22:46:08 INFO]: Command execution stopped due to limit (executed 1 commands)
[22:46:09 INFO]: This server is running Folia version 1.21.8-6-ver/1.21.8@612d9bd (2025-09-30T14:11:15Z) (Implementing API version 1.2...
I expect to NOT be able to crawlphase, when phasing into blocks via pearls, you should not be able too when crawlhpasing, yet you can.
Able to crawlphase when normally not able too.
For steps to reproduce, ( i wasnt clear) you need
. Any MC client with the module " velocity" ( it will push you out of the block in vanilla if you dont example, meteor client. )
. Pearls
. No specifc block you should use, i personally use obsidian because its what im used too. But you can phase into any block.
. You must aim at the border of the block and then deploy the pearl, all you do is place a block, look at the bottom where it meets the block below it, and then deploy the pearl in the middle of them!
https://streamable.com/52yb1z
Folia and papermc, thats it.
im just a bystander who plays on a server( 2b2tpractice.org 2b2t.org)who observed this issue, im not the...
It appears the issue was caused by NMS operations via a plugin.
It has now been resolved.
1.21.11 when?
1.21.11
1.21.10
No response
is this project dead?
Last commit was 3 months ago
Need volunteeer. Not me, im not good.
No response
why update question got closed with "not planned" answer?
Its not "not planned". It's "no estimated time of arrival". We are not an enterprise business, things get some when people find time in their life for free work, we just don't know when that is.
You either wait for someone to donate their free time to update folia or you update it yourself. Leaf will get to it at some point but when he finds the time for it is up in the air. Could be today. Could be in a week. In a month. Who knows
in regards to:
You either wait for someone to donate their free time to update folia
Unless opinions have changed (which i dont think given Folia is kinda complex) per this comment I understand it that it is not really wanted to have updates made by outside people.
https://github.com/PaperMC/Folia/pull/220#issuecomment-2104933723
e1120c1 Rebuild patches in prep of update - Spottedleaf
8bfaa08 Update build system - Spottedleaf
585b886 Update API patches - Spottedleaf
45c4dea First pass on updating server patches - Spottedleaf
3cc24fe First pass of updating minecraft feature patches - Spottedleaf
1de06ce Some compile fixes - Spottedleaf
8b274f8 First review pass - Spottedleaf
[```
paste your stack trace or a paste.gg link here!
](https://mclo.gs/MQUE9S1)
### Plugin and Datapack List
> pl
[13:49:13 INFO]: ℹ Server Plugins (15):
[13:49:13 INFO]: Bukkit Plugins:
[13:49:13 INFO]: - AnarchyExploitFixes, AntiopByChaLiuCore, AxGraves, BetterRTP, BetterTeams, ChatFilter, LuckPerms, Matrix, packetevents, Plan
[13:49:13 INFO]: PlayerViewDistanceController, SkinsRestorer, TAB, ViaBackwards, ViaVersion
### Actions to reproduce (if known)
_No response_
### Folia version
This server is running Folia version 1.21.8-6-ver/1.21.8@612d9bd (2025-09-30T14:11:15Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
You are running the latest version
### Other
Does this look like a tab completion issue?
What were you entering into the chat bar when this occurred?
Secondly this is an offline mode server.
你当时在聊天栏输入什么?
其次,这是一个离线模式服务器。
I didn’t discover this issue myself, and the player who did doesn’t want to tell me how to reproduce it.
After I asked the AI, it told me this error happens when using the Tab key. So I changed the tab-spam-limit value (from 500 to 50), and then I noticed the problem got better (players can't crash the server instantly anymore; it now takes a few seconds or they might get kicked out).
As for the server, it's actually offline mode since most players in my area don't have MOJANG accounts.
When using the /ride command in 1.21.11 on an entity in the same region, it works fine. However, when attempting to ride an entity out of region, it causes a crash due to how the Entity#startRiding command is written, making it not region threading safe when attempting to ride an entity out of the current region.
This was tested and is replicatable in the latest Folia 1.21.11 commit by forceloading a chunk(or chunks) far outside the current region, and then running the command:
/ride @s mount @e[limit=1,type=!player,sort=furthest]
This effectively tries to teleport the mounter -> mount target, where the mount target and mounter are not in the same region. The fix in this PR provides a fix for the entirety of the Entity#startRiding method, and also a thread check at the HEAD of the method to ensure that Entity#startRiding is called on the region of the mounter entity.
The command ride, return, rotate and so on should be disabled on folia and the could be never executed
They are not disabled and causing crashes when player or console executed them
And what in the Commands.java:
<img width="1198" height="530" alt="Image" src="https://github.com/user-attachments/assets/19a476d3-123b-470d-a7a3-bfe353f5c26c" />
Call one of them, for example it could be found in PR https://github.com/PaperMC/Folia/pull/412
no plugins and datapacks
The latest commit of folia
No response
控制台没有任何错误但是一个四乘四的一个区块加载错误 第一张是在这个Folia创建的随机地图 第二张是是我在本地复制的种子在客户端上创建的世界
<img width="1920" height="1009" alt="Image" src="https://github.com/user-attachments/assets/5669ea09-ffe4-4663-a1b6-2612dc64b664" />
<img width="1920" height="1009" alt="Image" src="https://github.com/user-attachments/assets/205f26d6-89b9-411f-89d3-c0ea20695c57" />
刚加入世界往右看就看到了
往右看
没有任何插件
folia-1.21.11-2
No response
[19:55:20 INFO]: Done (7.443s)! For help, type "help"
[19:55:29 INFO]: UUID of player beengoo is e1d52487-74fe-46db-948a-82ffa057a9b0
[19:55:30 INFO]: beengoo joined the game
[19:55:30 INFO]: beengoo[/127.0.0.1:53314] logged in with entity id 95 at ([world]-56.94311053857109, 85.49313574198008, 31.53544797766236)
[19:55:30 ERROR]: [io.papermc.paper.threadedregions.TickRegionScheduler] Region #1 centered at chunk [-4, 1] in world 'world' failed to tick:
net.minecraft.ReportedException: Exception ticking world
at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1934) ~[folia-1.21.11.jar:1.21.11-3-eee7128]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1744) ~[folia-1.21.11.jar:1.21.11-3-eee7128]
at net.minecraft.server.dedicated.DedicatedServer.tickServer(DedicatedServer.java:429) ~[folia-1.21.11.jar:1.21.11-3-eee7128]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.t```...
None, I tested this on a fresh install of a exaroton server.
About 30 seconds after the server is online this error occurs and the server shuts down.
=[13:03:02 INFO]:
Checking version, please wait...
[13:03:03 INFO]:
This server is running Folia version 1.21.11-3-ver/1.21.11@eee7128 (2025-12-21T23:35:28Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
No response
Disabling RPC should temporarily resolve your problem. It's in server.properties, here: management-server-enabled
While technically region-threading safe, the rotate command should be scheduled to the target argument in the rotate command, rather than the command source. The target entity is the object we are modifying the rotation of, so we should schedule to that region if not in that region already.
This also adds a utility method, Entity#runAtOrScheduleToImmediately, which will run the Consumer<Entity> task immediately if it is the correct tick thread for the entity, otherwise, it will schedule to the entity scheduler immediately.
This is a critical issue where crafting slots are kept on death instead of dropping like normal.
This also resolves https://github.com/PaperMC/Folia/issues/393
Unfortunately I never got around to reviewing this, and it's not relevant anymore in 1.21.11
Trying to adjust the riding code to allow cross-region rides really doesn't make any sense. There are conditions to allowing a mount that can change if you delay the mount. For example, already being mounted.
The actual appropriate fix for cross-region rides is for the caller to teleport so that the mount is no longer cross-region. I've adjusted the command to not allow the mount unless they are in the same region.
The original Entity#isRemoved check should be preserved. I've done it here: https://github.com/PaperMC/Folia/commit/aff1c5192e833ad0b90e509985f53017fd7c67bb
Sounds good, was just about to close this as I noticed the recent commits. Ill try and keep in mind the 2 comments u gave regarding my 2 now merged/closed PRs for the future
Thank you!
Rebased for ver/1.21.11
Hi - please open any reports or make any replies in the future in English. That will make things much easier for us.
We are unable to reproduce this. Would recommend testing on the most recent build with a new seed. If you can reproduce it reliably please add reproduction steps and we will re-open this issue. Thanks!
Closing this for now as it's not on the roadmap.
The ride and rotate commands are fixed but the return command was removed.
Regions are dynamic based on what chunks are loaded nearby. Chunks that are nearby are grouped together as a region.
Nothing we can do to split up areas with lots of nearby chunks. That would require an entirely different architecture.
Closing as this isn't on the roadmap.
Closing as an upstream issue (and may actually be fixed in recent Paper versions).
This is likely better create on the docs repo:
https://github.com/PaperMC/docs
But not sure how long it would be before anyone can get to this.
Unable to reproduce this. If you can reproduce on the most recent build of 1.21.11, please re-open.
Please don't create Github issues for Folia release builds. They'll launch when they launch.
Please reproduce on 1.21.11 and post a crash log if the crash is still occurring.
Please reproduce on 1.21.11 and post another crash log if this is still occurring.
(Note: Paper and Folia do not support or approve of offline mode servers)
Unable to reproduce this locally, and the attached video doesn't work. Please re-open and re-attach video if you're able to reproduce on 1.21.11.
This method isn't supported by Folia.
Please reproduce on Folia 1.21.11 and re-open if still an issue.
Closing for now as command blocks aren't on the roadmap.
This doesn't really work with the current design of Folia.
Please reproduce on 1.21.11 and provide reproduction steps if still an issue.
Unable to reproduce. Please reproduce on 1.21.11 and provide a log along with reproduction steps to re-open this issue.
Unable to reproduce this. Please reproduce the issue on 1.21.11 on a fresh world if it's still an issue.
Please reproduce on 1.21.11
Unable to reproduce. Please reproduce on 1.21.11 and re-open the issue if problem persists.
Closing this as unable to reproduce. If you can reproduce on 1.21.11, please re-open and provide reproduction steps.
Please reproduce this on 1.21.11 and re-open if still an issue.
Yeah this was fixed and was a valid issue so this is in fact resolved.
Cannot reproduce. If you can reproduce this issue on 1.21.11, please re-open.
Is this still an issue? Can you update the link to the code for the plugin for reproduction steps?
Not able to reproduce this locally. If you can reproduce on 1.21.11, please re-open this issue.
This seems like it may be a plugin accessing something it shouldn't. If you can reliably reproduce in 1.21.11, please provide reproduction steps and another crash log and reopen the issue.
wait, this was still open?
While POI update scheduling works fine on Folia, it has a major flaw with how it works. In the region threading base patch, Folia replaces the method call BlockableEventLoop#execute with RegionizedTaskQueue#queueChunkTask. While this works fine in general gameplay, it does cause all POI updates to be scheduled to the next tick, which technically breaks vanilla behavior and also breaks a few things(videos and images bellow).
The BlockableEventLoop#execute method is as such:
public void execute(Runnable task) {
R runnable = this.wrapRunnable(task);
if (this.scheduleExecutables()) {
this.schedule(runnable);
} else {
this.doRunTask(runnable);
}
}
Essentially, it checks if it is the "main thread" or not(which no longer exists in Folia, but for this case we will assume the "main thread" is the region owning the BlockPos we are updating at), and if it is the "main thread", it will run the task immediately, oth...
At least make it ignore parameters, not crush a whole server
This is a genuine issue and should be reopened. This method is not called by a plugin or something else, and is called by Vanilla source code, and the call should just be skipped or ignored, or completely removed by the region threading base patch.
The /dialog command is disabled in Folia, which this PR fixes. The command itself is relatively simple, and the entire dialog system is run on just packets(at least for the server side). The dialog system is only disabled, in Folia, from the command side. Plugins and signs can still execute dialog operations on Folia.
The dialog command only iterates over the target players, and sends a packet. The changes in this PR basically just schedule the sending of the packets to the target player scheduler, which while simple, fixes the dialog command functionality.
For testing purposes, I used the example dialog commands from the Minecraft Wiki:
/dialog show @a minecraft:server_links
/dialog show @a {type:"minecraft:notice",title:"Hello"}
/dialog show @a {type:"minecraft:confirmation",title:"Give yourself diamond?",yes:{label:"Yes please","action":{"type":"run_command","command":"give @s diamond"}},no:{label:"Nope"}}
/dialog clear @a
Pearls should stay, for example, in a stasis chamber until a player dies if using the default gamerules.
Tested it on both Paper and Folia just to be sure.
On PaperMC and vanilla Minecraft, the pearls do not get deleted when switching dimensions but on Folia 1.21.11 they do get deleted once the player leaves the dimension.
Make a stasis chamber, put a pearl in the chamber and go through a portal to change dimensions.
Tested with no additional plugins installed.
1.21.11-6-ver/1.21.11@0795007
No response
While probably not a necessary command to reimplement into Folia, it should probably be implemented for more Vanilla parity and such.
The fix introduced here essentially schedules the full method in a very similar way as the other command patches. The ServerPlayer#setCamera method is already patched to support off-region targets, so we schedule the method contents to the ServerPlayer spectator.
Ive tested this via the command below:
/spectate @e[limit=1,type=!player,sort=random] Dueris
The issue is caused by the ThrownEnderpeal#tick method, where it checks if the owner entity is alive, which calls isRemoved. In Folia, this is different, and causes ender pearls to vanish when switching dimensions.
The fix proposed is to replace the !isAlive() check(which is just isRemoved()) with getHealth() <= 0, which functions correctly with how it should work.
This required for DMC parameters to just work.
Hi. My thought is to add a ConcurrentLinkedList as a queue for each CraftPlayer, which holds the entity uuids to remove, and drain the queue on each player tick.
I can create a PR about this as a temporary fix. Or, do anyone have a better idea?
seed: -4617748357806537589
<img width="1920" height="1009" alt="Image" src="https://github.com/user-attachments/assets/51ec5438-1e1e-4f97-a35a-ce89086a2188" />
What I saw while running the map
1
No plugins that actually modify the world
This server is running Folia version 1.21.11-6-ver/1.21.11@0795007 (2025-12-25T03:04:11Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-2-39b4122 (MC: 1.21.11)
No response
With Folia, teleporting a tamed animal, like a wolf, to a player that is now not in the same region, is technically thread-safe because of Folias current patch. However, there is a race condition where if the chunk the tamed animal is trying to teleport to isn't loaded yet, it crashes the server because when it is trying to check if it CAN teleport, it tries to check blocks in that chunk, but if the chunk isn't loaded, it tries to load it. Thus causing a crash since if the target location isn't in the same region, it will kill the server because of a bad access(trying to load chunk outside owning region).
The fix proposed here just checks if the chunk is loaded first, and if it is loaded, then it will proceed. Otherwise, returns false.
This is something I was trying to fix earlier today, however was unable to find a practical solution. This is however a very large issue.
My thought is to add a ConcurrentLinkedList as a queue for each CraftPlayer, which holds the entity uuids to remove, and drain the queue on each player tick.
The fix proposed here would probably not be the greatest way to resolve this. However the issue stems from the mere usage of the visibility API, and how Folia unsafely accesses this API. It isn't something that should really be synchronized, as that could create insane performance issues, and replacing the collection with a concurrent alternative isn't the greatest idea either. By simply using the API, even from the correct owning context, the server is at risk of crashing randomly whenever an entity is removed due to this unsafe access.
This is indeed a desperate issue and should be fixed ASAP, given the severity of the issue and just USING the API causing risk of this crash, and many popu...
I believe queue and remove on tick can be a temporary, working solution.
You cannot add a entity to the map (there's a thread check for entities, but not for players I think), that are in different tick threads, so draining the removed queue on tick thread should be thread safe. And entities in different tick threads will not be updated to the player.
Actually, the reason is quite specific to how Folia handles player data compared to Vanilla/Paper.
The Persistence Issue (Why they vanish on restart): In Vanilla and Paper, active Ender Pearls are stored inside the player's NBT data. However, because accessing ServerPlayer across threads is unsafe in Folia, the logic for saving and loading pearls via player NBT was completely removed. This is why pearls do not reappear when a player logs back in—the data is simply never saved.
The Dimension/Region Issue (Why they vanish on teleport): Regarding your observation about pearls getting deleted when switching dimensions: This is because Folia performs extensive owner != null checks. Since Folia is multi-threaded, once the player leaves the pearl's current region (or dimension), the local entity lookup returns owner = null. Consequently, the pearl is immediately discarded/killed by the system.
The Solution: To fix this, we need to solve two problems:
How to safely store pearl data i...
https://github.com/PaperMC/Folia/pull/423
This already fixes the issue. The dimension/region issue you described is incorrect, as its not owner != null checks, its if the owner is removed.
Yeah you may have overdone it in your core.
Ender dragon spawns
When using summon to summon a dragon far from 0,0, the dragon did not appear as expected; instead, it appeared briefly, was immediately deleted, and an error was thrown, but server not crashed.
Go away from 0,0
Then wait for chunk 0,0 unload
Summon a ender dragon
No plugin provided
1.21.11-6-ver/1.21.11@0795007
We have try almost main version of folia, this bug may can reproduced in all the folia versions.
Resolution from Luminol: https://github.com/LuminolMC/Luminol/blob/ver/1.21.11/luminol-server/minecraft-patches/features/0073-Sync-dragon-part-when-teleportation-or-firstly-creat.patch
Original issue: https://github.com/LuminolMC/Luminol/issues/167
Enderpearl stay the same i nthe chunk without it being removed when chunk get unloaded.
Enderpearl was removed when chunk unload.
paper-world-defaults.yml
misc.legacy-ender-pearl-behavior: true
fixes.disable-unloaded-chunk-enderpearl-exploit: false
in Folia 1.21.8-6-612d9bd when doing everythign like above the pearl stay there and doesnt get removed.
pl
[20:02:15 INFO]: ℹ Server Plugins (0):
datapack list
[20:02:18 INFO]: Unknown or incomplete command. See below for error
datapack list<--[HERE]
ver
[20:01:58 INFO]: Checking version, please wait...
[20:01:58 INFO]: This server is running Folia version 1.21.11-10-ver/1.21.11@1aa7055 (2026-01...
This is a duplicate of https://github.com/PaperMC/Folia/issues/421, resolved in the PR https://github.com/PaperMC/Folia/pull/423
<img width="2560" height="1369" alt="Image" src="https://github.com/user-attachments/assets/692d2f6d-c09a-4991-b2d4-4e7225257067" />
I was not able to reproduce this by flying to the location, then teleporting into the exact same position as the OP. Appears to work perfectly fine.
This server is running Folia version 1.21.11-10-ver/1.21.11@1aa7055 (2026-01-04T19:46:20Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
Running on Windows 11 with Open JDK 22
@B4seUser I think you may lost your original seed in level.dat in overworld, can you provide your each level.dat in world, world_the_nether and world_the_end ?
I expected to see normal command block work...
I saw command blocks does nothing when using any commands (gamerule command_block_work set to true, option in server.properties is on true), command blocks saying "all is ok" but not working
.
Plugins: [16:57:19 INFO]: ℹ Server Plugins (32):
[16:57:19 INFO]: Paper Plugins (8):
[16:57:19 INFO]: - CrazyCrates, HuskHomes, MiniMOTD, PerfoBooster, PlugManX, SmartSpawner, Veinminer, Veinminer-Enchantment
[16:57:19 INFO]: Bukkit Plugins (24):
[16:57:19 INFO]: - AuthMe, Chunky, CommandBlocker, CoreProtect, CrazyEnchantments, Duels, GrimAC, ItemEdit, LagFixer, LevelledMobs
[16:57:19 INFO]: packetevents, PlaceholderAPI, PvPManager, SkinsRestorer, TAB, ToolStats, Towny, TPA, Vault, ViaBackwards
[16:57:19 INFO]: ViaRewind, ViaVersion, voicechat, voicemessages
16:57:57 INFO]: Checking version, please wait...
[16:57:...
command blocks dont work with folia also its a duplicate of #387
Add worldborder command!
Command blocks are not supported and are fundementally disabled in Folia. Also, for the future, if you have an issue with Canvas(of which I'm the dev of), ask in our discord or open an issue in github, don't use the Folia repo. Even if it is a Folia issue though, they won't help you if you are using Canvas. Just letting you know so that nobody gets mad and everything stays nice and tidy 😁
Regardless, this should probably be closed as command blocks are relatively difficult to implement in their entirety, and this isn't planned to implement ATM as far as I know.
Am I wrong, or doesn't this event fire at all in builds for 1.21.11 of Folia ???
Players shouldnt be able to travel through Nether portals while inside a boat (with or without a villager).
When a player enters a Nether portal while riding a boat (sometimes transporting a villager), the screen turns completely black, as if the player is falling endlessly into the void.
After forcefully disconnecting, the player is unable to rejoin the server. The server behaves as if the player is still online, preventing login and effectively soft-locking the player until manual intervention (e.g. player data reset).
T...
I don't know if it's fixed or if something no longer appears
This server is running Folia version 1.21.11-10-ver/1.21.11@1aa7055 (2026-01-04T19:46:20Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are -4 version(s) behind
Download the new version at: https://papermc.io/downloads/paper
Previous version: 1.21.11-6-0795007 (MC: 1.21.11)
<img width="1920" height="1040" alt="Image" src="https://github.com/user-attachments/assets/29ee0b7f-f9bb-4c89-9f8e-358cd1bcac78" />
The Villager should safely teleport to the Nether, similar to other entities or players.
The server throws an exception and the Villager fails to teleport:
Error Log
java.lang.IllegalStateException: World mismatch: expected world_nether but got world
at net.minecraft.world.level.Level.getCurrentWorldData(Level.java:830)
at net.minecraft.world.level.Level.getDayTime(Level.java:1914)
at net.minecraft.world.timeline.AttributeTrackSampler.applyTimeBased(AttributeTrackSampler.java:35)
at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.computeValueNotPositional(EnvironmentAttributeSystem.java:257)
at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.getDimensionValue(EnvironmentAttributeSystem.java:224)
at net.minecraft.world.attribute.EnvironmentAttributeSystem$ValueSampler.getValue(EnvironmentAttributeSystem.java:231)
at net.minecraft.world.attribute.EnvironmentAttri...
[03:20:41 INFO]: ℹ Server Plugins (0):
This server is running Folia version 1.21.11-10-ver/1.21.11@1aa7055 (2026-01-04T19:46:20Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are -4 version(s) behind
I believe a client-side mod shouldn't cause the server to crash, so I reported it.
Having the allowEnteringNetherUsingPortals game rule set to false should disallow players from entering the Nether.
Even when the game rule is set to false, the players are able to enter the Nether.
/gamerule allowEnteringNetherUsingPortals falseNone
Folia version 1.21.11-10-ver/1.21.11@1aa7055 (2026-01-04T19:46:20Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
This issue has already happened in Paper (https://github.com/PaperMC/Paper/issues/13261) and has already been fixed there (https://github.com/PaperMC/Paper/pull/13263), this means Folia just needs to be updated to the latest Paper version
/dialogs doesn't exist in the current Folia 1.21.1-1 JAR. It should be present and open dialogs for players as expected.
The command doesn't exist, it's recognized in game.
Use /dialogs
None
1.21.11 (build: 1aa7055)
No response
A pull request exists; you must wait for it to be merged or implemented yourself
### Expected behavior
After entering the Nether, the player should be teleported immediately, because the fishing bobber remains in the world, continues to hold down the pressure plate, the redstone signal stays active, and the trapdoor remains open.
### Actual behavior
The fishing bobber is removed immediately after changing dimension, the redstone signal is lost, the trapdoor closes, and the teleportation does not occur.
Plugins None
1.21.11(1aa7055)
### Additional notes
I understand that this behavior may be related to Folia’s region-based mul...
When a villager passes through the nether portal, he moves between worlds.
If the villager tries to move through the nether portal, it will disappear and an error will appear. If the villager was in the boat with the player, then the player gets stuck and will no longer be able to log on to the server until the restart.
[12:40:53 ERROR]: Entity threw exception at world:-116.39333593048231,63.0,256.7907611771183
java.lang.IllegalStateException: World mismatch: expected world_nether but got world
at net.minecraft.world.level.Level.getCurrentWorldData(Level.java:830) ~[folia-1.21.11.jar:1.21.11-10-1aa7055]
at net.minecraft.world.level.Level.getDayTime(Level.java:1914) ~[folia-1.21.11.jar:1.21.11-10-1aa7055]
at net.minecraft.world.timeline.AttributeTrackSampler.applyTimeBased(AttributeTrackSampler.java:35) ~[folia-1.21.11.jar:1.21.11-10-1aa7055]
at net.minecraft.world.attribute.EnvironmentAttributeSyste```...
https://mclo.gs/BI1E4tl
[14:05:18 INFO]: ℹ Server Plugins (118):
[14:05:18 INFO]: Paper Plugins (5):
[14:05:18 INFO]: - BlueSlimeCore, HuskHomes, HuskSync, nightcore, PlugManX
[14:05:18 INFO]: Bukkit Plugins (113):
[14:05:18 INFO]: - 40ServidoresMC, AFKZone, AntiAFKPlus, AntiAFKPlusAddon, AntiDnTEnchantments, Argus, AttributeFixer, AxInventoryRestore, AxPlayerWarps, AxSellwands
[14:05:18 INFO]: AxTrade, BetterClan, BetterRTP, BetterRTP-MultiServer-Instance, BetterRTP-MultiServer-Requester, Bitsy, BlackMarket, ChatControl, ChunkHoppers, Chunky
[14:05:18 INFO]: ChunkyBorder, CloseCommand, CMILib, CombatLogX, CombatTPAGuard, CommandSynchronizer, ConditionalEvents, ConsoleSpamFixReborn, CoreProtect, CoreProtectPurgeScheduler
[14:05:18 INFO]: CosmeticPlus, CustomDeathMessages, CustomNameplates, CustomServidoresMCMessages, DailyChallenges, DeluxeMenus, *DisableJoinMessage, DiscordSynchronizer-Minecraft, DropConfirmation, eco
[14:05:18 I...
It stops itself because it's in a consistent state, so a restart would be able to save as much as possible in normal state before it becomes so corrupted that it won't be able to do anything, and after the start the server should be ok again.
That is for sure a plugin issue. Folia isn't for everyone, and you should try to use less public plugins in order to have more control over knowing what may mess with stuff in an unsafe manner
It stops itself because it's in a inconsistent state, so a restart would be able to save as much as possible in normal state before it becomes so corrupted that it won't be able to do anything, and after the start the server should be ok again.
That is for sure a plugin issue. Folia isn't for everyone, and you should try to use less public plugins in order to have more control over knowing what may mess with stuff in an unsafe manner
Folia definitely isn’t for everyone, which is why nearly 60% of the plugins we use are custom. That said, there’s no need to reinvent the wheel. I’ve been thinking about plugins that might be manipulating entities, and the only ones that come to mind are TAB and possibly Floodgate.
Is there any way to get more detailed information about the error, maybe some kind of debug mode? With the information currently available, it’s going to be quite difficult to pinpoint the cause, especially since it only happens once every one or two weeks.
That sort of error is generally down to plugins teleporting entities during unsafe events to do so, there generally isn't any debug mode for that, most cases of debugging that sort of thing for me would generally require modifying the server to try to capture such dangerous interactions I theorise are happening
Your only 2 choises here are either binary search in hopes you find the broken plugin, or you install a debugger agent and put a breakpoint on this error
Got it, thanks guys. I’ll do my best to figure out what’s going on.
EntityDamageByEntityEvent#getDamager() should return CraftEnderPearl.
Debugger shows this value for Paper:
<img width="1523" height="784" alt="Image" src="https://github.com/user-attachments/assets/aefec42b-220b-4491-be4b-0245e5f33049" />
EntityDamageByEntityEvent#getDamager() returns Player.
<img width="1274" height="295" alt="Image" src="https://github.com/user-attachments/assets/8fcff754-8dce-4347-b3d7-9cfa776480c8" />
EternalCombat
This server is running Folia version 1.21.11-11-ver/1.21.11@e112b00 (2026-01-20T18:53:05Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-100-4873e3f (MC: 1.21.11)
No response
Fix the World loading/unloading API
Fix the World loading/unloading API
no
No response
It's not broken just that nobody had time to make it, as it's quite complex, especially the unloading part. You can open a pr with it if you want and you have time to make it. You can look at https://github.com/PaperMC/Folia/pull/63 for at least a few things to consider, but as a side note the internals changed in some ways for reasons like optimisations that makes it even harder now to make such a pr than when my pr was made
calling entity.teleportAsync(destination, PlayerTeleportEvent.TeleportCause.PLUGIN, TeleportFlag.Relative.values()) should preserve the entity's motion after teleportation
motion is not preserved
entity.teleportAsync(destination, PlayerTeleportEvent.TeleportCause.PLUGIN, TeleportFlag.Relative.values())unrelated
[18:01:37 INFO]: Checking version, please wait...
[18:01:37 INFO]: This server is running Folia version 1.21.11-11-ver/1.21.11@e112b00 (2026-01-20T18:53:05Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.11-100-4873e3f (MC: 1.21.11)
No response
I'm also seeing this on ver/1.21.11@e112b00, it is reproducible 100% of the time and causes a very severe softlock for any player in the boat.
Teleport in a boat with a villager in it
[15:31:33] [ServerMain/INFO]: [bootstrap] Running Java 21 (OpenJDK 64-Bit Server VM 21.0.10+7; Arch Linux null) on Linux 6.18.7-zen1-1-zen (amd64)
[15:31:33] [ServerMain/INFO]: [bootstrap] Loading Folia 1.21.11-12-ver/1.21.11@6d795a8 (2026-02-08T00:47:27Z) for Minecraft 1.21.11
[15:31:33] [ServerMain/INFO]: [PluginInitializerManager] Initializing plugins...
[15:31:33] [ServerMain/INFO]: [PluginInitializerManager] Initialized 0 plugins
[15:31:35] [ServerMain/INFO]: Environment: Environment[sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, profilesHost=https://api.mojang.com, name=PROD]
[15:31:35] [Yggdrasil Key Fetcher/ERROR]: Got an error with a html body connecting to https://api.minecraftservices.com/publickeys: <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='ht...
looks like you copied the wrong stacktrace
regardless this is a duplicate of #436 and #431
This PR adds a Photographer API to Folia so the server can record gameplay as .mcpr replays (ReplayMod-compatible). Plugins can create "photographer" entities that mirror a player, capture network packets, and write them to a .mcpr file when recording stops.
| Area | Description |
|---|---|
| API (folia-api) | New interfaces: PhotographerManager, Photographer, BukkitRecorderOption. Server exposes Server#getPhotographerManager(). |
| Server implementation | ServerPhotographer (fake player), Recorder, Replay... |
不是,你往这里放啥呀?
他又不可能合并你的pr😂这种功能就没必要拉上来了吧?他不可能合并的。
⚠️ Security & License Concerns - Compiled .class Files Should Not Be Committed
To the maintainers (@PaperMC team):
I recommend not merging this PR in its current state due to serious concerns about binary files and GPL compliance.
To the PR author (@xiaofanforfabric):
Thank you for your contribution, but there are some critical issues that need to be addressed:
🔴 Problems:
24 compiled .class files are being committed to the repository
Binary files like .class should never be in version control
They are automatically generated during the build process
They belong in .gitignore, not in the repository
GPL License violation concern
The GPL requires source code transparency
Committing pre-compiled binaries without a verifiable build process contradicts open-source principles
Users cannot verify if the .class files actually match the provided .java source code
Security risk
Pre-compiled .class files could contain malicious bytecode not visible in the source
T...
Holy AI... both semi in code and in comments
This is out of scope of Folias intentions and goals, and most likely will not get merged, along with the fact that there are changes in the README too..??? And weird new MD files??? And compiled class files???
Out of scope, I don't think this would rly ever be merged, especially given this seems to be doing a lot more than just a Photographer API, like calling it a Folia fork in the unneeded README changes... when being PRed to merge with Folia?? And the insanely long debug file??
这本来就是一个错误的拉取请求,本意是要合并到我的项目,结果不知为何拉到了paperMC官方的项目,我了解不会合并的,我不在意
This was originally an erroneous pull request. The intention was to merge it into my own project, but for some reason it was submitted to the PaperMC official repository. I understand it won’t be merged, and I don’t mind.
When a sticky piston extends and retracts in-game, both BlockPistonExtendEvent and BlockPistonRetractEvent should fire respectively.
When a sticky piston extends and retracts in-game, only BlockPistonExtendEvent fires; BlockPistonRetractEvent never fires.
minimal demo plugin:
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.BlockPistonExtendEvent;
import org.bukkit.event.block.BlockPistonRetractEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class PistonPlugin extends JavaPlugin implements Listener {
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
}
@EventHandler
public void onPistonExtendEvent(final BlockPistonExtendEvent e) {
System.out.println("a piston extend event occurred!");
}
@EventHandler
public void onPistonRetractEvent(final```...
That's a paper issue which will be fixed in https://github.com/PaperMC/Paper/pull/12985
Same, mine on 1.21.5 and its doesnt work either
i experience the same issue @Jeppa
Having the same issue on folia 1.21.8 and 1.21.11
This PR fixes a Folia villager Nether portal bug where villager AI could be initialized before the destination world was fully applied during async portal teleportation.
As a result, Villager.makeBrain() and Brain.updateActivityFromSchedule() could run while the villager was still in a temporary world-mismatch state.
Entity.transformForAsyncTeleport(...) now exposes the destination world context during async teleport restore.Villager.makeBrain...I built a very large Guardian farm on a Minecraft Folia server that uses Nether portals to move Guardians to the Nether and then back to the Overworld.
The issue only occurs when entities are teleported back from the Nether to the Overworld.
After the farm enters the despawn sphere, the following happens:
A few seconds later, the server console starts spamming error messages (see logs below).
Nether portals completely stop working (for both players and entities).
After some more time (seconds to minutes), the server becomes even more unstable:
In creative mode, it is no longer possible to break or place blocks.
Entities cannot be interacted with or spawned properly.
Persistence:
The issue persists even after restarting the server.
The only way to fix it is to manually delete the affected Nether chunk entity files:
<world_name>/DIM-1/entities/<affected_chunk_file> (the area where the farm is located in the Nether), and then restart the server.
Additional...
Closes #406
Almost no performance impact, should be a good fix before a better vanish API implement.
Let me know if it should be included in the base patch
I tested it across Vanilla, Paper, and Folia dedicated servers, and the bobber despawns on dimension change in all of them. It seems this stasis chamber trick only works in single-player
This is covered in the documentation
I have not seen a mention of this anywhere. Could you please share it?
I’ve been trying to fix this but I keep running into the error that my pearls in a stasis despawn when switching dimensions. Does anyone have a plugin or fix that worked for them?
Please let me know if there’s any way to fix this
Doesn't getName tho in CraftEntity(and other methods) access the getCustomName method in Entity, which accesses the synched entity data? IIRC, that's not safe
I think I checked all places where these methods are called but I can't really remember anymore.
I think this PR can be closed to be honest.
It's not abt where the methods in the API are called, it's that it's accessing a system internally that isn't thread safe and is used for a lot of different states, so making it unguarded isn't the best idea bc then if people start accessing the internal synched entity data off the region context then it can cause crashes easily that make no sense(Ive seen a few before)
So yea probably should be closed maybe
Sorry man, I remembered this PR and wanted to throw my thought in
I have done the migration on my own fork:
https://github.com/LunaDeerMC/Folia/tree/dev/26
Are you willing to accept a PR? If so, please create a dev branch.
No response
<img width="836" height="542" alt="Image" src="https://github.com/user-attachments/assets/f22dc03d-3dbc-4d19-8581-7147258b734c" />
There is no ETA on 26.1.2 development release or progress. That should be handled by SpottedLeaf.
I do see in your branch though that you include extra patches alongside region threading, which wouldn't be accepted, and should be merged to the Region-Threading-Base patch if related. Alongside that, I do see some commits/patches and a few other changes were authored by Copilot, which I dont think is accepted ever at PaperMC.
Overall, no ETA, it may be a week, a month, or several months. You can use your own fork, or be patient for the official Folia release. AI-written code I dont think is accepted at PaperMC, so probably wouldn't be merged in the Folia repository, also given that there are multiple patches that should be part of the region threading base patch.
There is no ETA on 26.1.2 development release or progress. That should be handled by SpottedLeaf.
I do see in your branch though that you include extra patches alongside region threading, which wouldn't be accepted, and should be merged to the
Region-Threading-Basepatch if related. Alongside that, I do see some commits/patches and a few other changes were authored by Copilot, which I dont think is accepted ever at PaperMC.Overall, no ETA, it may be a week, a month, or several months. You can use your own fork, or be patient for the official Folia release. AI-written code I dont think is accepted at PaperMC, so probably wouldn't be merged in the Folia repository, also given that there are multiple patches that should be part of the region threading base patch.
You are right, shouldn't introduced extra patches. I've already merged the extra patches into the existing.
Anyway I am doing some test on this, If anyone want to try folia on 26 version, enjoy yourself :)
a few other changes were authored by Copilot, which I dont think is accepted ever at PaperMC.
Actually, the entire migration is done by copilot, It's really good at this kind of jobs.
Yea AI-written contributions aren't accepted at PaperMC I dont think, and normally Minecraft update PRs are also never accepted, so I dont think this would be accepted tbh
It's best to wait for SpottedLeaf to update himself
We do not have any kind of "ban" on using AI tools for contributions, in fact most team members are not living under rocks and make use of these tools. But using AI does not mean low-quality submissions are OK. You are still expected to review and fully understand your submission and to take ownership of it (in a responsibility sense). This doesn't appear to be the case here, and the linked diff is basically unusable. It may compile but I would not advise using it.
We do not have any kind of "ban" on using AI tools for contributions, in fact most team members are not living under rocks and make use of these tools. But using AI does not mean low-quality submissions are OK. You are still expected to review and fully understand your submission and to take ownership of it (in a responsibility sense). This doesn't appear to be the case here, and the linked diff is basically unusable. It may compile but I would not advise using it.
Fair enough, I was unsure on what the stance was on AI in PaperMC, and def understand utilizing AI only if you do understand what it's changing and review it and such. Thank you for clearing that up tho, much appreciated!
We do not have any kind of "ban" on using AI tools for contributions, in fact most team members are not living under rocks and make use of these tools. But using AI does not mean low-quality submissions are OK. You are still expected to review and fully understand your submission and to take ownership of it (in a responsibility sense). This doesn't appear to be the case here, and the linked diff is basically unusable. It may compile but I would not advise using it.
I really hope that leaf can spilit his larrrrrggggge patch into some small one. It seems that the workload of each update is now no less than re-implementing a new folia.
This Pull Request introduces major architectural improvements and essential API additions tailored specifically for Folia's regionised multithreading environment. It addresses long-standing issues like global scoreboard synchronization and per-region performance stabilization.
GlobalScoreboardManager to provide a thread-safe way to interact with the global scoreboard from any region using the GlobalRegionScheduler.RegionHealthManager to monitor per-region performance (MSPPT) and provide hooks for dynamic load mitigation.FoliaPerformanceOptimizer which automatically throttles non-player entity AI/Physics in specific regions when they fall below performance thresholds (45ms+ MSPPT), ensuring stable 20 TPS.Creaking, CreakingHeart, and Breeze API extensions to Folia with full thread-safety and region-aware...You should not submit multiple features in a single PR
The version is specified, and it's the same as PaperMC
The version is unspecified, and building it causes it to produce unspecified folder in the local .m2 repository.
./gradlew applyAllPatches./gradlew -PpublishDevBundle publishToMavenLocal.m2 repository under dev/folia/dev-bundle and dev/folia/folia-api to see unspecified folders.None
https://github.com/PaperMC/Folia/commit/de00a9486ffd69589d687dc152780fe013be4573
I noticed that the version field in gradle.properties was removed, but Paper has these lines in its settings.gradle.kts
gradle.lifecycle.beforeProject {
val mcVersion = providers.gradleProperty("mcVersion").get().trim()
val paperVersionChannel = providers.gradleProperty("channel").get().trim()
val paperBuildNumber = providers.environmentVariable("BUILD_NU```...
When a player rides a vehicle (boat, minecart, mounted animal, etc.) and the vehicle enters an end portal in The End, the player should be returned to their personal respawn location (bed / respawn anchor / Player#setRespawnLocation), matching the behavior of a player walking into the end portal on foot.
At minimum, EntityPortalEvent (or PlayerPortalEvent for the passenger) should be fired so plugins can correct the destination.
When a player is a passenger of any non-player vehicle (most easily reproduced with a boat that also carries another mob, since solo riders are dismounted automatically) and that vehicle hits an end portal block in The End:
The whole passenger tree, including the player, is teleported to the overworld world spawn, not the player's respawn location.
Neither EntityPortalEvent nor PlayerPortalEvent is fired for this teleport, so plugins cannot intercept and rewrite the destination.
A player walking into the s...
It can be an exploit or big mistake, I think its both. Basically the finish configuration packet makes the netty thread wait. Big mistake, this can be used by attackers and give micro lags for bad connections. Someone with bad connection joins -> half the server freezes for a moment. Exploiter joins -> entire server lags.
It seems like a design flaw:
[16:14:42 INFO]: ℹ Server Plugins (20):
[16:14:42 INFO]: Paper Plugins (1):
[16:14:42 INFO]: - PlugManX
[16:14:42 INFO]: Bukkit Plugins (19):
[16:14:42 INFO]: - AuthMe, AuthMePremiumBu...
I think it might be present on paper too, I recomemnd rolling up a fix on everywhere.
I made a build but I dont know how to contribute as it doesnt work like 1.8.8 or velocity and thats the only one I learned to make.
Here is a jar and source of my solution:
https://drive.google.com/file/d/14zngIAsl9HHaUFlqqiEHOtW89zTKHOjT/view?usp=drive_link
https://drive.google.com/file/d/1HjG4PhAxDQtTnte7_L4PCntk8JtIp2J4/view?usp=drive_link
Also sorry for sending a leaf stacktrace, Its because I lost my original stacktrace, but its the same one on all servers and same logic. It happened on my folia server -> made update and ignored it. Today I got report from someone using leaf and I think this should be rolled to everyone (Paper / Folia) so then it can be propagated by other authors (basicaly it currently affects folia confirmed by me) If you need the original folia stacktrace i can find it.
From what I can see, the fix is in the Connection class, in the syncAfterConfigurationChange method
<img width="1199" height="759" alt="Image" src="https://github.com/user-attachments/assets/0667e082-b18e-4864-9a6e-a34d943e5937" />
adds safety checks to prevent users from waiting indefinitely
<img alt="Image" width="1199" height="759" src="https://private-user-images.githubusercontent.com/197017618/587812022-0667e082-b18e-4864-9a6e-a34d943e5937.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzgwMjA0MzYsIm5iZiI6MTc3ODAyMDEzNiwicGF0aCI6Ii8xOTcwMTc2MTgvNTg3ODEyMDIyLTA2NjdlMDgyLWIxOGUtNDg2NC05YTZlLWEzNGQ5NDNlNTkzNy5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNTA1JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDUwNVQyMjI4NTZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1mMDRhNjBjOGMzN2MxYjcyNjEwNDYzZmQ4NjY4MzE5YTkzMmI2MWQ0MDdkYmVmOTEwMGM1MzEzOTk5MGJlNmNmJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.-8jZ8DV3ZBAUlABKr7JBbtWEdzg-g-5SUjeiXLF4mR4">
adds safety checks to prevent users from waiting indefinitely
Basically proceed to make a callback instead of a wait....
The thing just uses a future to know that netty has dispatched the packet before it continues, this is not ideal but not really an issue I've seen anything with outside of bad plugins on the network stack. Hard to say what is going on here due to the logs missing all of the useful watchdog information here.
Leaf has 'async-switch-state' setting to not wait on main thread.
Probably what happened here is that some plugin called some bukkit method from netty thread what caused chunk loading, so netty thread started waiting for Server/Main thread (to finish chunk loading and do Future.complete(chunk)) while server thread started waiting for task finish scheduled to same netty thread what is waiting main thread.
So it basically deadlock.
Netty thread is waiting for main thread to do something and main thread is waiting for netty thread to do something.
its not an exploit unless attacker can send ServerboundFinishConfigurationPacket and then send some packets to overload netty thread (make netty to decode packets 100% time) so it will not execute that ConfigurationChange task.
It would be incredibly helpful if you could provide proper and complete logs in Paper that actually let the watchdog dump all threads to see what's happening on the netty threads while the main thread is "blocked".
I've seen this twice and both instances there was a plugin on the netty threads that caused the delay
I will be more specific but only based on symptoms as I fixed it on my server already thus I dont have to deal with this anymore.
I tried making a mod, but it didn't work as the original ones. they loaded the commands on the playerJoin of the region and executed them as Commands from the Server.
Maybe, it's a solution to re-enable only some of the commands, like /say, or /execute or something?!
in console 2 PRINTs
[TPtest] Enabling TPtest v1.0-SNAPSHOT
[TPtest] [STDOUT] TPtest enabled
[TPtest] [STDOUT] EVENT
[TPtest] [STDOUT] CANCEL
and dont let player teleport
(it works on latest paper)
nothing just letting player teleport when it shoud be cancelled (yes plugin was working i made simple loop that prints test)
Write simple plugin (
package org.kokosowy869.tPtest;
import org.bukkit.GameMode;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerTeleportEvent;
import org.bukkit.plugin.java.JavaPlugin;
public final class TPtest extends JavaPlugin implements Listener {
@Override
public void onEnable() {
getServer().getPluginManager().registerEvents(this, this);
System.out.println("TPtest enabled");
}
@Override
public void onDisable() {
}
@EventHandler
public void onTp(PlayerTeleportEve...