Solved Custom Biomes In Custom World

Discussion in 'Spigot Plugin Development' started by ChickenStyle, Feb 3, 2022.

  1. Hello, I am trying to recreate Twilight Forest as a plugin and I encountered a weird issue.
    So I found this really cool tutorial
    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:

    Chunk Generator: (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:
  2. 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.
  3. 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:
  4. You mean restart?
    Reload is not really supported and discouraged.
  5. He meant reload, he used a reload and it caused this issue
  6. Then it isn't an issue. Just don't reload.
  7. Thank you guys! Issue solved :)
  8. 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 :)
    • Like Like x 1