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

Immersive Portals nukes everything from World Blender's dimension in both Forge and Fabric #502

Closed
TelepathicGrunt opened this issue Dec 14, 2020 · 8 comments

Comments

@TelepathicGrunt
Copy link

My World Blender mod: https://www.curseforge.com/minecraft/mc-mods/world-blender-fabric

I have no clue as to what is going on. By this, I mean, if World Blender and Immersive Portals is on, no ConfiguredFeature, ConfiguredCarver, or ConfiguredStructure gets imported into World Blender's dimension. Not even Vanilla's stuff. The mod works with any other mods but the moment Immersive Portals is on, the dimension gets nuked of everything.

I tried having Blame on and yet, the logs still show nothing. I use a mixin in MinecraftServer that runs last so that my mod can find and import all worldgen stuff from other mods. Even if the other mods haven't switched to using the BiomeModificationAPI from Fabric API.
https://github.com/TelepathicGrunt/WorldBlender-Fabric/blob/4199a03281467f755ac2b83f1ddbfab9c064aaf0/src/main/java/com/telepathicgrunt/world_blender/mixin/MinecraftServerMixin.java#L52

It doesn't seem like a datapack issue (my biomes are empty json that I add my stuff to) as I tried making a datapack to add ConfiguredFeatures to the Plains biome in Overworld and it works. It seems to be something completely different. I'll try and add Immersive into my dev environment to try and dig up more detail

@TelepathicGrunt
Copy link
Author

I tried everything I could but I could not get immersive portals to run in my dev environment. I always had trouble getting mods to work in it even with jitpack or using the dev jars.

lmk the right way to add immersive and I can debug it on my end. Here's my mod's jars if you want to test:
world_blender-1.16.4-1.0.11.zip

@qouteall
Copy link
Member

I am going to check it later. What's the message you get when trying to run IP in dev env? If it doesn't work try

modImplementation('com.github.qouteall.ImmersivePortalsMod:imm_ptl_core:1.16-SNAPSHOT') {
        exclude 'fabric-api'
    }

@TelepathicGrunt
Copy link
Author

Yeah that works. Thank you! Will start testing now.

If you are curious as to what I was attempting before, this is what I was doing:
If I use the dev jar from the GitHub releases in mods folder, I get this error: https://hatebin.com/qhehnrbbkh
If I use the dev sources jar in mods folder, I get this error: https://hatebin.com/stmlafczmo
If I try the jitpack with implementation 'com.github.qouteall.ImmersivePortalsMod:build:v0.52-1.16', I get: https://hatebin.com/wyrulhnuso

@TelepathicGrunt
Copy link
Author

TelepathicGrunt commented Dec 15, 2020

I found some clues but it is very strange. First, I need to describe how my mod works. At the end of MinecraftServer's init, I run world blender's code to take the dynamic registry from MinecraftServer's constructor, pull my biomes out of it, and start adding everyone's stuff to my biomes. I do it here and last so that even if people are not using the BiomeLoadEvent, my mod will still be able to add their features to my biome.
https://github.com/TelepathicGrunt/WorldBlender-Fabric/blob/master/src/main/java/com/telepathicgrunt/world_blender/mixin/MinecraftServerMixin.java

Then in my mod's biome source, I use the registry passed in to spawn my biomes. This registry is the dynamic registry.
https://github.com/TelepathicGrunt/WorldBlender-Fabric/blob/4199a03281467f755ac2b83f1ddbfab9c064aaf0/src/main/java/com/telepathicgrunt/world_blender/generation/WBBiomeProvider.java#L55

Now what I had found is my biomes i manipulated in MinecraftServer are no longer the same biome when pulled out of the registry in the biome source for worldgen later. If Immersive Portals is off, the biomes are indeed the same biome instance but when it is on, the two are not the same anymore and is "reset" in a way to before my changes to the biomes were done.
image

I did check the registry itself and the registry in the biome source is the same instance as the biome registry in the MinecraftServer. So somewhere between MinecraftServer and when Biome Sources are made, Immersive Portals is causing the registry to dump out its contents and remake it from scratch. Idk where but hopefully this helps narrow down the issue
image

Edit: More testing shows when Biome Source's constructor runs, the biomes in the registry are correct. It's after the creation of the biome source does the registry get dumped and remade.

@qouteall
Copy link
Member

qouteall commented Dec 16, 2020

My debugging (without world blender) shows that the biome object in registry does not get replaced. You can try to add a breakpoint in SimpleRegistry.set with condition key.getValue().getPath().equals("cold_ocean")

Are you using the latest fabric api?

@qouteall
Copy link
Member

Maybe the latest commit fixes it.

@TelepathicGrunt
Copy link
Author

Just checked and yep, the dimension is back to normal. Thank you!
image

@qouteall
Copy link
Member

That dimension is cool

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

No branches or pull requests

2 participants