Posted November 19, 20195 yr Hey guys, beginner programmer here who's made an ores mod. When people download the mod, the ores don't spawn in already generated chunks, they only spawn as the world expands and generates fresh chunks from player movement. I would like for my mod to spawn in already generated chunks so the player doesn't have to travel arbitrarily far to find the ores. I looked into it, and apparently there are some mods from 1.12 that have retrogen capabilities; however, I found no open-source mods for 1.14.4. I have no idea where to start. Any suggestions?
November 19, 20195 yr There might be some built-in capability for this, in which case you can ignore me, but this wouldn't be difficult to do "from scratch," so to speak. You could fairly simply store a boolean for each chunk, whether or not it's been affected by your ore generation, and do some block replacement logic on the chunk if not (then toggle the boolean, naturally). You would only need to run this check when a chunk was loaded, so you could use the event that fires when a chunk is loaded (I'm not sure what it's called in 1.14. From a brief search, it seems to be ChunkEvent.Load, but don't quote me on that). I haven't done world generation yet, so I can't advise you on keeping runaway chunk generation from happening, but you should look into that if you haven't already. Fancy 3D Graphing Calculator mod, with many different coordinate systems. Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.