[Incompatibility: <NeoForge>]: ChunkPregen
Minecraft Version
1.21
Moonrise Version
Latest?
Mod Loader
NeoForge
Logs and Crash Reports
[24May2025 11:01:47.793] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Preparing Task [GenExample]
[24May2025 11:01:47.863] [Server thread/INFO] [net.minecraft.server.MinecraftServer/]: Starting Task [GenExample]
[24May2025 11:01:48.066] [Server thread/ERROR] [net.neoforged.bus.EventBus/EVENTBUS]: Exception caught during firing event: null
Index: 3
Listeners:
0: net.neoforged.bus.EventListenerFactory$onServerTickEvent/0x000000e801b74000@76a1a410
1: net.neoforged.bus.EventListenerFactory$postServerTick/0x000000e801b84c00@348339d0
2: net.neoforged.bus.EventListenerFactory$onServerTickEventPost/0x000000e801be5000@787b13a5
3: net.neoforged.bus.EventListenerFactory$onTickPost/0x000000e801c81400@d012f15
java.lang.UnsupportedOperationException
at TRANSFORMER/[email protected]/net.minecraft.server.level.GenerationChunkHolder.scheduleChunkGenerationTask(GenerationChunkHolder.java:568)
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkProcess.startTask(ChunkProcess.java:259)
at TRANSFORMER/[email protected]/pregenerator.common.generator.GenerationType.startSubTask(GenerationType.java:108)
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkEntry.startTask(ChunkEntry.java:93)
at TRANSFORMER/[email protected]/pregenerator.common.generator.GeneratorQueue.enqueue(GeneratorQueue.java:46)
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkProcess.drainIntoQueue(ChunkProcess.java:232)
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkProcessor.onTickStop(ChunkProcessor.java:166)
at TRANSFORMER/[email protected]/pregenerator.common.manager.ServerManager.onTickPost(ServerManager.java:347)
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:350)
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:315)
at TRANSFORMER/[email protected]/net.neoforged.neoforge.event.EventHooks.fireServerTickPost(EventHooks.java:1010)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:943)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:707)
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267)
at java.base/java.lang.Thread.run(Thread.java:1583)
[24May2025 11:01:48.072] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
java.lang.UnsupportedOperationException: null
at TRANSFORMER/[email protected]/net.minecraft.server.level.GenerationChunkHolder.scheduleChunkGenerationTask(GenerationChunkHolder.java:568) ~[server-1.21.1-20240808.144430-srg.jar%23122!/:?]
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkProcess.startTask(ChunkProcess.java:259) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at TRANSFORMER/[email protected]/pregenerator.common.generator.GenerationType.startSubTask(GenerationType.java:108) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkEntry.startTask(ChunkEntry.java:93) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at TRANSFORMER/[email protected]/pregenerator.common.generator.GeneratorQueue.enqueue(GeneratorQueue.java:46) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkProcess.drainIntoQueue(ChunkProcess.java:232) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at TRANSFORMER/[email protected]/pregenerator.common.generator.ChunkProcessor.onTickStop(ChunkProcessor.java:166) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at TRANSFORMER/[email protected]/pregenerator.common.manager.ServerManager.onTickPost(ServerManager.java:347) ~[Chunk-Pregenerator-Neoforge-1.21-4.4.5.jar%23125!/:1.21-4.4.5]
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:350) ~[bus-8.0.2.jar%2362!/:?]
at MC-BOOTSTRAP/net.neoforged.bus/net.neoforged.bus.EventBus.post(EventBus.java:315) ~[bus-8.0.2.jar%2362!/:?]
at TRANSFORMER/[email protected]/net.neoforged.neoforge.event.EventHooks.fireServerTickPost(EventHooks.java:1010) ~[neoforge-21.1.172-universal.jar%23123!/:?]
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:943) ~[server-1.21.1-20240808.144430-srg.jar%23122!/:?]
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:707) ~[server-1.21.1-20240808.144430-srg.jar%23122!/:?]
at TRANSFORMER/[email protected]/net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:267) ~[server-1.21.1-20240808.144430-srg.jar%23122!/:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
[24May2025 11:01:48.814] [Server thread/FATAL] [net.neoforged.neoforge.common.NeoForgeMod/]: Preparing crash report with UUID ce64a181-c721-445b-9a9b-ef1d6360c120
Additional Context
You rewrite the entire chunk management system and all functions that could be useful to moddevs, especially with optimizations (which i use heavily), are simply not implemented or "unsupported".
You may rewrite the backend as you wish, but any function that is "public" should be supported. You can not expect that moddevs make a completely new version just for moonrise specifically.
For my specific usecase: I use the function "scheduleChunkGenerationTask" directly to keep track of the loading stage of a chunk. While a public method does exist in ServerChunkCache (getChunkFuture), it is extremely slow when you queue up 1024 chunks at once. So you will array copy the entire chunk map 1024 times, and it forces you to wait (block the main thread) for each chunk being loaded/generated. And even if you try to make this by running this code on a different thread, minecraft will delegate your code to the main thread anyways. (Which is a good thing FYI) My implementation is a bulk copy version of said function, to make it a single copy of the entire chunk grid and make it simply not block the main thread while waiting for chunks to be loaded/generated. And all functions/fields are public to come to that point.
Note: Copying chunk grid is calling: ServerChunkCache#runDistanceManagerUpdates (Mojang maps)
Edit: Updated a few things to make it more clear why i do need to access certain things.
Reference https://github.com/TinyModularThings/Chunk-Pregenerator-Issue-Tracker/issues/104
Moonrise doesn't "copy the chunk grid." I wrote a concurrent long -> object hash table to avoid that.
You want me to implement this public method for an optimisation that is obsoleted by Moonrise? Maybe these functions are useful if you are running the Vanilla system but I think if you care about the Vanilla system running fast you should realise that the Vanilla system is flawed and should not be used.
@Spottedleaf so you ask me to write a specific implementation that only works for moonrise and 0 other mods?
I already know that your implementation is different, i looked at the source. The point is, you are not supporting public functions in the sense of they can be used as "callback". Meaning i have to come up with a system that can't use callbacks at all, and can not trust that anything that is publically accessible by default actually works.
So what i am asking is: Please make it consistent with vanilla, even if it is a custom impl you should be capable of supplying the original functions.
if it were anything smaller i would simply adapt, but this is sadly too deeply used within my mod and would require a rewrite. I am building on top of a callback and/or api where i can test if something is already done without causing a block. I am sorry :/