NucleoidMC / fantasy

Library to support creating dimensions at runtime
GNU Lesser General Public License v3.0
95 stars 26 forks source link

[Request] Default biome when creating new dimension #48

Closed Aareon closed 2 months ago

Aareon commented 4 months ago

Not sure if it's feasible, but if it would be possible, can there be a method to set a specific biome for a dimension? Or if anyone has any guidance as to how to make something like this works. All input is appreciated!

begrs commented 4 months ago

var worldConfig = RuntimeWorldConfig() .setDimensionType(DimensionTypes.OVERWORLD) .setGenerator( new VoidChunkGenerator( server.getRegistryManager().get(RegistryKeys.BIOME) .getEntry(BiomeKeys.PLAINS).get() ));

This works for me, although I currently have some issues with floating entities when a client first joins - don't think its related though. It is only for the void dimension, but you could step into the voidChunkgenerator code and check what it does exactly and replicate that.

Aareon commented 3 months ago

Thanks @begrs I'll check it out!

begrs commented 3 months ago

update: it works perfeclty using it as I suggested. My issue was that for some reason a player joining a temporary dimension from the start, still had the overworld loaded in client side.

begrs commented 2 months ago

@Aareon please close the issue if it worked for you too :)