AllenSeitz / DimDungeons

A Minecraft mod which adds proceedurally generated dungeons.
15 stars 12 forks source link

[1.16.5] Portal not forming #29

Closed faeldray closed 3 years ago

faeldray commented 3 years ago

I've updated from v1.12 to v1.13 of the mod and I can't get the portal to appear. I don't think it's an issue with the portal build itself, this is what it looks like. And I have a portal key that's been activated.

2021-07-29_13 04 58

I did notice this error in the latest.log whenever I try to activate the portal so hopefully that will help.

https://gist.github.com/faeldray/97342773caca48aefa50f6c1745ac0b9

Edit: Just wanted to add if I downgrade to v1.12 again, everything works fine.

AllenSeitz commented 3 years ago

Uh oh. It crashed while generating a theme key in a random monster's off hand. What is in your server config?

faeldray commented 3 years ago

Do you mean in defaultconfigs/dimdungeons-server.toml? Here's the file. The only thing I changed in there is the breaking whitelist, to add the graves from Corail Tombstone.

AllenSeitz commented 3 years ago

That looks perfect. I am very worried right now.

faeldray commented 3 years ago

Oh no, that's not good! I did just test the portal in a very small pack (just JEI, TheOneProbe, and Xaero's World/mini map) and I didn't get any errors. So it seems to be a mod conflict. I'll try to do some tests with different mods from my pack and see if I can isolate the issue.

AllenSeitz commented 3 years ago

I just uploaded 1.13.1 to CurseForge which fixes two different crash bugs. One related to stale configs and me trying to overwrite existing values with newer default values. (Which I think is the problem you're having.) And the second was that I listed Forge 36.0.1 as the minimum required version, yet it would crash if you didn't have at least 36.2.0 installed.

faeldray commented 3 years ago

I haven't had a chance to test for conflicts in my pack (it has a lot of mods >.>), but I did try out 1.13.1. I even deleted dimdungeons-client.toml and dimdungeons-common.toml just to make sure those weren't a problem. Unfortunately I still got the same error: https://gist.github.com/faeldray/c4786269a6174d78007c70b012641398

AllenSeitz commented 3 years ago

This is interesting. Here are the top 3 lines of where it crashed.

at net.minecraft.entity.EntityType.handler$zgl000$spawnFromItemStack(EntityType.java:636) ~[?:?] FROM at net.minecraft.entity.EntityType.func_220331_a(EntityType.java:313) ~[?:?] FROM at com.catastrophe573.dimdungeons.structure.DungeonPlacementLogicBasic.spawnEnemyHere (line 397)

So my code called vanilla EntityType.spawn(). (That's what func_220331_a is.) And then that function called something else and crashed.

Here's my code that calls EntityType.spawn()

396: EntityType<?> entitytype = EntityType.byString(resourceLocation).orElse(EntityType.CHICKEN); 397: Entity mob = entitytype.spawn((ServerWorld) world, null, null, pos, SpawnReason.STRUCTURE, true, true);

So I'm definitely not passing a null entity type. First, it turns out that if the list of mobs in the config is empty that it would've crashed sooner. (Oops.) So actually that "or else just spawn a minecraft:chicken" thing never happens. At this point I have to have a valid resource location probably pointing to a minecraft:zombie or a minecraft:husk. So I'm kind of out of ideas here. I can't replicate the crash either.

faeldray commented 3 years ago

Okay, I've managed to find the cause. It's from the Forgery mod, specifically the cracking spawn eggs tweak. If only that feature from the mod is turned on, that causes the error. I'm guessing it replaces the default spawn egg behaviour somehow? I'm honestly fine with turning that off, it's just a cosmetic thing anyways. I don't know if you think it's worth changing your code over.

AllenSeitz commented 3 years ago

Thank you for finding this! That is a very special case.

The only place I use spawn eggs is inside dispensers. But I don't think that wouldn't cause this, since the dispensers aren't being triggered when the dungeon is created. (I don't think.) But do report this to the author of Forgery.

faeldray commented 3 years ago

Does this look like the same error? I'm not familiar with Java so I can only guess. If it is the same, it looks like a fix is coming out soon.

AllenSeitz commented 3 years ago

Not quite the same. Although the fix might still fix both.

faeldray commented 3 years ago

Since it's such a small thing, I'll just wait and see if the fix stops the error. But I think that's that mystery solved so I'll close the ticket. Thanks so much for your help and quick responses!