[Fabric-1.16.3-0.41] Immersive Portal registry parsing using a fresh Impl may break the parsing of dimensions and cause log spam.
TelepathicGrunt opened this issue · 8 comments
Ok so this might be a bit tough to explain but with Jigsaw structures, we can specify template pools to pick random nbt files or features to spawn in our structures. Here's an example one: https://hastebin.com/ineseteyej.json
What I have found is that when my mod, Repurposed Structures is on with Immersive Portals, several of the pool json files my mod uses fail to get parsed and so, will break and prevent parts of my structure from spawning. Here's the log and the issue can be found by the Pool element: Failed to parse minecraft
spam:
https://hastebin.com/ruvajubila.yaml
I seen similar issues happen twice before with structure processor json files and it was always because other mod added extra properties to the blocks that the processors used since the processors blows up if they do not list every property of the block exactly. However, Immersive Portals doesn't add/remove properties so this is probably a dead end. Some of the log spam even says it is breaking with minecraft:empty
processor entries which shouldn't break.
But what is really strange is I cannot reproduce this issue when using a datapack. It only happens when Repurposed Structures is on and Immersive Portals is on at the same time. The pool json I showed in the first link above seems to be one of the many pools that have broke but I don't see why it is breaking. I wish Mojang would make codecs more clear on why they explode. ANy insight into this would be greatly appreciated!
https://github.com/TelepathicGrunt/RepurposedStructures/tree/master It looks like a forge mod and I cannot test it
Actually I have a fabric repo. I kept them separate which is a bit unusual. https://github.com/TelepathicGrunt/RepurposedStructures-Fabric
Haven’t tested in dev yet. I can try later
yeah it happens in dev using v0.41-1.16 immersive and my 1.16 branch for repurposed structures. I pushed to that branch my setup. It should be able to be ran immediately with immersive due to me adding jitpack to the build.gradle.
Found a clue as I was breakpointing where the codec fails during world creatiion/entering. It seems that the dynamic registry lost all vanilla entries for some reason and only has repurposed structure's. Mega odd.
Following the code lead me to com.qouteall.immersive_portals.portal.custom_portal_gen.CustomPortalGenManagement's onDatapackReload method at this line.
https://github.com/qouteall/ImmersivePortalsMod/blob/d37a6e578ca4d1493e3ec510fbd596aa09bed30b/imm_ptl_core/src/main/java/com/qouteall/immersive_portals/portal/custom_portal_gen/CustomPortalGenManagement.java#L51-L56
So it seems it might not actually affect my structure's generation but instead, is just log spam spit out by vanilla when immersive is trying to run the codecs to get only modded dimensions from my understanding. Since the vanilla entries don't exist, it blows up anything that requires vanilla entries which, could include dimension json files as well. For example, people could make their dimension use the vanilla chunk generators and when the codec goes to parse it, it would not be able to find the vanilla chunk generator and blow up the codec which could lead to immersive not getting all dimensions in theory. I'll edit the title to be more clear
Just fyi, you can get a DynamicRegistryManager from MinecraftServer by doing server.getRegistryManager() which seems to be what you were trying to do. You can grab all the worlds directly from the server as well by doing server.getWorldRegistryKeys for the keys and server.getWorlds for the actual worlds. So there shouldn't be a need to make a new DynamicRegistryManager from scratch. Hope this helps!
I tweaked it 1bcad06
It may be fixed