Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for Scape and Run: Parasites #54

Merged

Conversation

Axis-Denied
Copy link

@Axis-Denied Axis-Denied commented May 20, 2024

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!

…anging capabilities of the Node, by referring to the new biome Integer array.
@jchung01
Copy link

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
Copy link
Author

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

@ACGaming ACGaming merged commit 432094c into TerraFirmaCraft-The-Final-Frontier:master May 21, 2024
@Vetpetmon
Copy link

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
Copy link

jchung01 commented May 21, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scape & Run: Parasites nodes cannot overwrite biomes with their own.
4 participants