roberttkahelin8 / thingmajigs

A mod that adds decorations to your Minecraft Worlds.
Other
1 stars 1 forks source link

[Crash] Exit Code -1 with Thingamajigs 1.7.1 (LockedDoor Mixin Incompatibility DramaticDoors) #10

Closed adozenlionsroaring closed 7 months ago

adozenlionsroaring commented 7 months ago

I'm getting error "The game crashed whilst initializing game Error: java.lang.RuntimeException: null" with Exit Code -1. Minecraft version is 1.20.1, Forge version is 47.2.0 and Thingamajigs version is 1.7.1.

I have many, many other mods installed, so there is almost certainly a conflict happening somewhere. I've pasted the crash report here, which contains a list of the other mods: https://pastebin.com/nmBKiu18

Of particular relevance are these parts:

_"Suppressed: net.minecraftforge.fml.ModLoadingException: Thingamajigs (thingamajigs) encountered an error during the common_setup event phase §7java.lang.IllegalArgumentException: Cannot set property BooleanProperty{name=waterlogged, clazz=class java.lang.Boolean, values=[true, false]} as it does not exist in Block{minecraft:air}"

" at net.rk.thingamajigs.xtrablock.LockableDoor.(LockableDoor.java:47) ~[thingamajigs-1.20.1-1.7.1.jar%23975!/:1.20.1-1.7.0] {re:classloading} at net.rk.thingamajigs.block.ThingamajigsBlocks.lambda$static$929(ThingamajigsBlocks.java:2262) ~[thingamajigs-1.20.1-1.7.1.jar%23975!/:1.20.1-1.7.0] {re:classloading}"_

roberttkahelin8 commented 7 months ago

What exactly is the forgified fabric API needed for (mods-wise)? Specifically, the mods that require it? Also, the game crashes with Exit Code -1. This could mean a lot more mods are incompatible with many mods in this list which seem to change some vanilla classes a bit.

It seems my lockable door block is having an issue regarding one of these mods changing some aspect about doors.

roberttkahelin8 commented 7 months ago

Note: Dramatic Doors has an option to disable water logging for doors if there are conflicts with mods (my door (locked door) doesn't support waterlogging and cannot be modified as it uses custom behaviors. Try disabling that first and test. Locked doors do not open for anything if they are locked, and their bottom half opens the door, not the top half. This may cause MULTIPLE mods to have a bad conflict and disagree, especially with mixins having no clue that my LockedDoor is a rebel block and doesn't do what other doors do, despite extending from the DoorBlock. Remove the door mods if all they do is change doors, not if they add new doors.

roberttkahelin8 commented 7 months ago

Another Note: ModernFix and Ferritecore usually are fine with Thingamajigs, and they are mentioning blockstate errors, so there is definitely some issue regarding a mixin that one of these 'door' mods is using. The dramatic doors mod is using a mixin to change how the doors works and how they are registered, which would break my mod indefinitely. I've never tested that mod with mine as I never thought it would work with my mod anyways. Seems like this might be true.

roberttkahelin8 commented 7 months ago

One more major note: Remove my mod from your pack. If it still crashes, remove dramaticdoors. If it STILL crashes, something is very wrong, report back your findings please. I've used my mod with MANY other base and addon mods, and never had a crash before with any specific blocks (mostly I just have graphical bugs but nothing spontaneous like this crash is).

roberttkahelin8 commented 7 months ago

The fact the log is reporting that it cannot set a property on an air block means it didn't even have time to register the LockableDoor. Something before registries is messed up pretty badly: §7java.lang.IllegalArgumentException: Cannot set property BooleanProperty{name=waterlogged, clazz=class java.lang.Boolean, values=[true, false]} as it does not exist in Block{minecraft:air}

roberttkahelin8 commented 7 months ago

For ref: Here is the 1.20.1 mixin for the door block that is conflicting with the LockableDoor: https://github.com/Kitteh6660/DramaticDoors/blob/1.20.1-quifabrge/forge/src/main/java/com/fizzware/dramaticdoors/forge/mixin/DoorBlockMixin.java

This may be part of the problem, but DramaticDoors will blame this mod as the issue causer so you don't want to report the issue there.

@adozenlionsroaring As I cannot report issues that are specific to one mod to the creator of DramaticDoors, you may have to either not use the mod with mine (as the LockedDoor's functionality just can't be scrapped because of one mod) or not use my mod. I don't like it having to be the only options here, but I've looked at my code and the other mod's mixin code, and there is just absolutely no compatibility between the two unless one mod adds support for my LockedDoor functionality. Keeping this issue open in case some one knows how to solve the issue.

@adozenlionsroaring Just confirmed the crash myself. Its with Thingamajigs and DramaticDoors only.

adozenlionsroaring commented 7 months ago

Thanks for confirming the source of the incompatibility! Yeah I've just tried disabling the waterlogging feature in the config file of Dramatic Doors but you're right, it doesn't help and the problem is much more fundamental than that.

That said, I've taken a look at the Dramatic Doors GitHub page and it seems the mod owners are quite open to compatibility suggestions, so I'll bring this up not as an issue but as a potential request...a patch to support the LockedDoor functionality of Thingamajigs may not be in the cards, but who knows? In the meantime, I'll forego Dramatic Doors while I try out your mod. Thanks again for your help! :)

(BTW, the Forgified Fabric API is used for the Sinytra Connector, allowing Fabric mods to be run on Forge. A few of the mods I've installed are Fabric only, like BetterEnd and BetterNether, so it's been a godsend!)

roberttkahelin8 commented 7 months ago

Thank you for your crash report. It helps modders get things fixed up and more polished.

Kitteh6660 commented 7 months ago

I will look into a fix for this!

adozenlionsroaring commented 7 months ago

It's all good - see my comment here. :) Thanks again!

roberttkahelin8 commented 7 months ago

@Kitteh6660 Just for clarification: I've tested the mod and its only crashing with waterlogging enabled. If that can be fixed somehow, fine, but if not, there is a workaround, which is stated in the config for Dramatic Doors anyways.

Kitteh6660 commented 3 months ago

I will be adding Thingamajigs into the mod development environment and see if I can finally fix this issue for once and for all.

Kitteh6660 commented 3 months ago

It turns out there is a simple culprit. The lockable door does not use super for defining block states, thus it does not inherit any additional properties like waterlogging.

So there are two solutions that can be done:

  1. I will have to use a Mixin to manually inject waterlogging into LockableDoor.
  2. Adjust this to use super, to inherit the properties, and add a line for locked property. https://github.com/roberttkahelin8/thingmajigs/blob/45c9fa2bfa4180794c1071e99104642026a88978/rawsrc/1.20.1/xtrablock/LockableDoor.java#L129
    @Override
    protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_52803_) {
        super.createBlockStateDefinition(p_52803_)
        p_52803_.add(LOCKED);
    }

The second solution seems like the best way to go, since it means it will properly inherit any properties added such as waterlogged property.

2024-06-20_06 44 33