Oh The Biomes You'll Go Refabricated

Oh The Biomes You'll Go Refabricated

11M Downloads

Chocolate Alternative: Biome Id Fixer

desagas opened this issue ยท 7 comments

commented

Is your feature request related to a problem? Please describe.
Like Chocolate fix aims to fix, when your amazing biomes get added, Minecraft shifts the ids.

Describe the solution you'd like
Add new dependency: While Chocolate will definitely still have its benefits, Biome Id Fix does not require that you visit every chunk that you want to maintain the biome data within. The only thing that you have to do is load your world, be it on a server or integrated server, and doesn't require the altering of the region files when updating chunks.

Describe alternatives you've considered
I have been working on this mod for a while now, and have tested it with many mods that add biomes, including yours, Oh the Biomes you Go, as well as BoP, AE2, Rats, the Other, Mahou T, and Vanilla of course. While chocolate is nice and may still have its place, it is limited in the fact that you have to actually load the chunk before updating, while Biome Id Fixer does not require this.

Additional context
I just stumbled onto your nether quartz crystal biome, and I am a huge fan!

Here is my git: https://github.com/desagas/Biome-Id-Fixer

commented

So, after some long nights, it is now at full release. Like before, it does not require that you visit chunks first, it only requires that you load the world. This mod is now world specific, meaning that it you can have as many single player or server instances on you pack as you want, and each one will reflect their specific biome ids, regardless of adding or removing biomes, ordered in the order they have been added or updated to the game.

commented

I'm going to have to get input from other mod devs to determine whether or not your code is safe before I consider anything else

commented

Okay :). I will gladly take any feedback to try and make it safer, if it you determine it is not. It is just frustrating to have to go to every single chunk you want to save, otherwise.

commented

It is just frustrating to have to go to every single chunk you want to save, otherwise.

While this is accurate, if you install chocolate retroactively, it does not apply when creating a world after installing chocolate. So from the end user perspective, the only difference is "is my world already broken" at time of installing either mod.

That said, I took the liberty of taking a look at your mod. My thoughts:

  • I think chocolate is canonically a better fix for the actual issue. It's much simpler, and requires less invasion into vanilla's registry (e.g. mixin-ing into SimpleRegistry and doing getRegistryName().getPath().equals("worldgen/biome") is gross, I think is a fair characterization.). I can't speak for the correctness of the rest of the code, but hey, if it works, it works.
  • Otherwise, if it does what it says on the tin, then nicely done.
commented

Thank you for the feedback, I definitely appreciate it.

You seem to be pretty set on Chocolate, which is an awesome mod indeed, and works. When making this mod, I decided, at the time, that mixin registries was equivalent to altering the use of said registry as it was called, or equivalent to mixin the immutable registry process, which might interfere with BYG. I also considered that, in a world like mine, which was 16000x16000, or 1 million chunks, chocolate added around 30 and up characters to every chunk it interacts with, which translated into hundreds of MBs of data. Looking back now, that is small compared to the 60 plus GB world I had.

I would like to ask how you would listen to a specific resource location being registered, as or before it is actually registered, but I am kind of defeated in asking. Dozens of people I have asked have said pretty much the exact same thing: do not try to change registries, how they are made or how they are handled. I am still rummaging through both vanilla and forge code, as well as other examples out there, and am currently looking for listeners that can happen as a resource is being registered, without injecting code. In all honestly, I would much rather use a listener approach instead of the .equals() you described above, but I still have not found the listener that works.

Sadly, it is extremely rare for modders in this community to offer suggestions with their feedback, and rightfully so, it is not their job to do so. So, without people wanting to talk about what clean and safe code is to them, it is taking me a bit of time to find and write the code that people consider clean and safe in this context. But, I am determined to find out, and will continue to push towards it.

And, yes, I agree with you, they are very similar in their functions, when installed on packs with brand new worlds. So, the difference is small apparently small, but, it does work exactly as described. However, unintentionally, but lovingly so, mine offers some additional functionality that I never intended to implement, but did by mistake, which may offer more for adventure map makers than big packs or mods that are already associated with chocolate, like BYG.

Anyways, thanks again. Im definitely continuing to learn and grow.

commented

I would like to ask how you would listen to a specific resource location being registered

Well, the issue is vanilla doesn't have the functionality to do this And so your options are 1) rewrite large portions of the vanilla registry system to add this (bad, very incompatible), or 2) inject some really hacky generic fix (what you've done). There's not really a better way to get a feature out of something that wasn't designed for it in the first place. Hence why I went with a fix on the actual BiomeContainer itself rather than trying to manage the registry.

But, as of MinecraftForge/MinecraftForge@50d75a2 (which, per my limited testing seems to resolve the issue, still have to see if it works properly for data pack biomes.) maybe the whole point is moot.

commented

With forge merging the required fix, I will be closing this.