Hello, I am trying to recreate Twilight Forest as a plugin and I encountered a weird issue. So I found this really cool tutorial https://www.spigotmc.org/threads/how-to-create-custom-biomes.512105/ which explains how to make custom biomes and apply them, I followed the tutorial and it works perfectly fine, but when I try to use the same code when generation a custom world, it just freezes the server and after a couple of minutes the server crashes. My NMS handler class: https://github.com/ChickenStyle/Twi...style/twilightforest/nms/Handler_1_17_R1.java Chunk Generator: https://github.com/ChickenStyle/Twi...le/twilightforest/world/TFChunkGenerator.java (When I remove the line 49, the code works perfectly fine and it loads the custom world without any issues) Here is the crash error: https://pastebin.com/MvwtSthN
The chunk should never be access in generateChunkData as stated in the docs. The chunk is not available there, is loaded, the generator is called again, etc - which results in a loop. Do the biome stuff in a populator.
Thank you! It fixed the issue But now there is another issue xD When I start the server and load the twilight forest world everything works fine, you can join the world and play in it, but if I leave and reload the server, It starts to kick me from the server with this error: https://gyazo.com/2963719d4ace6b66d8b247ef3079825a
Btw, found the cause of this issue You gotta make sure that you don't register the custom biomes twice (which happens if you reload the server) You just need to find a way to check if the biome is registered or not