Fabricators-of-Create / Porting-Lib

A collection of utilities for porting mods from Forge to Fabric.
Other
125 stars 34 forks source link

[IDE] Crash due to class X overrides final method net.minecraft.client.gui.widget.PressableWidget.getTextureY()I #96

Closed Sollace closed 4 weeks ago

Sollace commented 8 months ago

I encountered this issue when adding a dependency to my project that uses PortingLib. What seems to be happening is PortingLib is taking private [non-final] methods and changing them to be public/protected + final.

In an obfuscated environment, this appears to work fine, but in a non-obfuscated one this causes problems because the access-widened method may end up having the same name as one declared in an overriding class further down-stream as is the case with one of my other dependencies.

I will be fixing it in my case in the downstream project, however I'm also filing this issue to give you notice that this issue might arise with other projects, and you probably should not be using transitive-accessible.

The offending AW can be found here: https://github.com/Fabricators-of-Create/Porting-Lib/blob/cecd25d6ecbeec60434631943af0224bcd2c3acb/modules/base/src/main/resources/porting_lib_base.accesswidener#L11