Closed Axis-Denied closed 3 months ago
Honestly, I didn't even know SRP source was available through Modrinth (as 3rd party downloads are disabled on CF). Anyways, it looks good to merge, but I'll make a follow-up PR later to bring it more in line with the other mod mixins.
Thanks! The Modrinth idea was actually from Modrome (or Vetpetmon, I believe he was discussing this issue with you earlier?)
Thanks! The Modrinth idea was actually from Modrome (or Vetpetmon, I believe he was discussing this issue with you earlier?)
Yes, you can thank me, Dhan, the other developers, and I have given this repository permission to use SRP's code to fix this issue that's been haunting us for over 2 years. Thank you!
The following suggestion is only tangentially related, but I figured it would be worth mentioning. This is meant for the SRP mod itself, and has less to do with REID. If the intention in ParasiteEventWorld.positionToBiome()
is to "reset" the Infected Biome to its original, the following line of code:
worldIn.getChunk(pos).getBiomeArray()[inChunkZ << 4 | inChunkX] = (byte) Biome.getIdForBiome(Biomes.PLAINS);
could be changed to this:
Biome original = worldIn.getBiomeProvider().getBiome(pos, Biomes.PLAINS);
worldIn.getChunk(pos).getBiomeArray()[inChunkZ << 4 | inChunkX] = (byte) Biome.getIdForBiome(original);
to retrieve the cached biome from the BiomeProvider
. This should properly "reset" the infected biome to whatever biome originally generated there instead of hardcoding it to set it to Plains.
@Vetpetmon feel free to forward this code to Dhanantry or whoever else develops the code if this is a desirable change.
This commit changes how SRP changes biomes by referring to REID's new biome array instead of the old one. It fixes both the Node and the Biome Purifier failing to work with the new chunk format. Fixes #4
Let me know if there are any issues with the code!