TerraFirmaCraft-The-Final-Frontier / RoughlyEnoughIDs

Fork of JustEnoughIDs. Minecraft 1.13+ chunk format in 1.12.2, removing the block, item, & biome ID limits.
https://www.curseforge.com/minecraft/mc-mods/reid
MIT License
10 stars 11 forks source link

Added support for Scape and Run: Parasites #54

Closed Axis-Denied closed 3 months ago

Axis-Denied commented 3 months ago

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!

jchung01 commented 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.

Axis-Denied commented 3 months ago

Thanks! The Modrinth idea was actually from Modrome (or Vetpetmon, I believe he was discussing this issue with you earlier?)

Vetpetmon commented 3 months ago

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!

jchung01 commented 3 months ago

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.