Topic category: Help with Minecraft modding (Java Edition)
So, I've been playing around with the possibility of changing the biome of certain coordinates and making it 'spread' (Similar to Thaumcraft 4 Taint), but I'm having trouble with the basic process of changing the biome - well, a process I thought would be basic. After half a day of troubleshooting and referencing old forge documentations, all I have is
IChunk chunk = world.getChunk(new BlockPos(x,y,z));
chunk.getBiomeArray()[(((int) z) & 15) << 4 | (((int) x) & 15)] = (byte) Biome.getIdForBiome(???);
(Note that, in MCreator, each line is a separate custom code snippet block)
Now, the first line is (thankfully) working just fine, though I cannot for the life of me find a way to make an IChunk into a Chunk, or to get a Chunk chunk from the getChunk method, and the gradle refuses to recognize the getChunkFromBlockCoords method. But, besides that, on the second line, you see the period right after chunk, as in the one in chunk.getBiomeArray? Whenever I try to save/build/etc. with this code, it keeps saying that the symbol is unidentifiable, and I cannot for the life of me figure out why. net.minecraft.world.chunk.Chunk is imported, so that shouldn't be the issue. Other than that, I have no clue how to get the ID of a custom biome (in my case, one called "nano_blight"), due to the fact that I cannot find how to get the biome object of a biome that doesn't exist physically in the world.
EDIT: IChunk does work as a Chunk just like IWorld to a World, but apparently MCreator imports IChunk and not Chunk? Despite the fact that it imports IWorld and World? ANyways, the only problem I have left is getting the ID of a biome (presumably) from the forge registry (or wherever else is easier to get it from, I'll take anything I can get at this point) Scratch that, didn't work. Why can't modding be easy? Anyhow, all problems are back on the table.
Side Edit: I haven't solved any of the problems yet, but apparently I've been attempting to use methods from both forge and fabric, and I've been referencing outdated JavaDocs. This is rough, man.
I've now come to realize that my only lead here was a java worldgen modding tutorial from 2019 that uses depreciated methods. I have no clue what to do. Disregard the previous problems I had in this post, now all I can ask is if someone knows how to change the biome of a given coordinate, procedure or code. Many thanks.