[Compat] Can not work with SnowUnderTrees
Closed this issue · 14 comments
Describe the bug
As soon as you get to the snowy biome you have this problem, and it's the same bug with version 1.20.1
"Worker-Main-7" daemon prio=4 Id=95 WAITING on java.util.concurrent.CompletableFuture$Signaller@488fde4c at [email protected]/jdk.internal.misc.Unsafe.park(Native Method) - waiting on java.util.concurrent.CompletableFuture$Signaller@488fde4c at [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:221) at [email protected]/java.util.concurrent.CompletableFuture$Signaller.block(CompletableFuture.java:1864) at [email protected]/java.util.concurrent.ForkJoinPool.compensatedBlock(ForkJoinPool.java:3740) at [email protected]/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3723) at [email protected]/java.util.concurrent.CompletableFuture.waitingGet(CompletableFuture.java:1898) at [email protected]/java.util.concurrent.CompletableFuture.join(CompletableFuture.java:2117) at TRANSFORMER/[email protected]/net.minecraft.server.level.ServerChunkCache.getChunk(ServerChunkCache.java:138) at TRANSFORMER/[email protected]/net.minecraft.world.level.Level.getChunk(Level.java:202) at TRANSFORMER/[email protected]/com.teamtea.eclipticseasons.common.core.map.MapChecker.getSurfaceBiome(MapChecker.java:397) at TRANSFORMER/[email protected]/com.teamtea.eclipticseasons.common.core.biome.WeatherManager.getPrecipitationAt(WeatherManager.java:325) at TRANSFORMER/[email protected]/com.teamtea.eclipticseasons.common.core.biome.WeatherManager.getPrecipitationAt(WeatherManager.java:315) at TRANSFORMER/[email protected]/net.minecraft.world.level.biome.Biome.handler$zmc000$eclipticseasons$getPrecipitationAt(Biome.java:1030) at TRANSFORMER/[email protected]/net.minecraft.world.level.biome.Biome.getPrecipitationAt(Biome.java) at TRANSFORMER/[email protected]/bl4ckscor3.mod.snowundertrees.SnowUnderTrees.canSnow(SnowUnderTrees.java:93)
You should have done a binary search test first. Fortunately, there were some clues in the stack; otherwise, this issue would have just been left hanging.
You should have done a binary search test first. Fortunately, there were some clues in the stack; otherwise, this issue would have just been left hanging.
thanks
It appears that the issue is caused by SnowyUnderTree attempting to query biome predictions during chunk generation. However, our biome prediction includes a correction step that projects it onto the surface (yes, Ecliptic Seasons requires surface biome information). Performing such queries during world generation is bound to cause problems.
It appears that the issue is caused by SnowyUnderTree attempting to query biome predictions during chunk generation. However, our biome prediction includes a correction step that projects it onto the surface (yes, Ecliptic Seasons requires surface biome information). Performing such queries during world generation is bound to cause problems.
It looks like the mod already contains what I need, so there's no need for me to use the SnowyUnderTree mod.
At the moment, I don't recommend using SnowyUnderTree. We have an alternative feature available under Client → Renderer in the configuration menu. This is because SnowyUnderTree is actually only compatible with Serene Seasons.
More importantly, our mod currently follows the principle of keeping world generation season-agnostic—that is, without adding any extra snow during generation.
At the moment, I don't recommend using SnowyUnderTree. We have an alternative feature available under Client → Renderer in the configuration menu. This is because SnowyUnderTree is actually only compatible with Serene Seasons.
More importantly, our mod currently follows the principle of keeping world generation season-agnostic—that is, without adding any extra snow during generation.
i see
One additional point worth mentioning: you might notice that vanilla snow works without crashing. That's because vanilla uses Biome.shouldSnow(LevelReader level, BlockPos pos), which is supported by our mod.
In theory, world generation should be querying this function instead of querying Precipitation.
I suspect this was specifically rewritten to support winter chunks in Serene Seasons.
I reopened the issue because it has some extended value and it's worth observing whether other mods do the same thing—though I can hardly think of any other mods that modify snow during world generation. If you find it bothersome, feel free to close it again.
我重新打开了这个问题,因为它具有一定的扩展价值,而且值得观察其他模组是否也做了同样的事情——尽管我几乎想不出还有哪个模组会在世界生成过程中修改雪。如果你觉得麻烦,可以随时再次关闭它。
nah, just thanks for all your hard work.
You might also notice another potential risk in this assumption—the lack of dimension binding. For all Minecraft-related biome predictions—well, in fact, Minecraft itself only makes a few such references—we've modified the relevant code to include a Level parameter instead of simply calling the function directly. This ensures seasonal independence across dimensions. However, not all mods are compatible with this approach. That's why, by default, we fall back to using the Overworld's season for mods that don't fully support Ecliptic Seasons yet. In the future, we plan to actively provide more compatibility modules, but for now, this mechanism is sufficient in most cases.