CyclopsMC / CyclopsCore

Minecraft library mod for EvilCraft, Integrated Dynamics and others.
http://cyclopsmc.github.io/CyclopsCore/
MIT License
20 stars 29 forks source link

Fix AbstractMethodError crash in SRG name envrionment #144

Closed SCLeoX closed 4 years ago

SCLeoX commented 4 years ago

The crash can be reproduced by interacting with any container that extends ContainerExtended in non-development envrionment.

This PR renames IValueNotifiable's getType to getContainerType and implement the said method in ContainerExtended class.

Previously, ContainerExtended implements the IValueNotifiable interface by extending vanilla class Container, which has a method called getType. However, after reobfuscation, the getType method from Container class gets reobfuscated to some other name, causing ContainerExtended to no longer properly implement IValueNotifiable, and leading to AbstractMethodError during runtime.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.007%) to 22.993% when pulling 0daa0db6da7cec40f366918edd302313b2736c97 on SCLeoX:patch-0 into ca86a549300129f1800bdb9694b9c4d8aad451f2 on CyclopsMC:master-1.15.

rubensworks commented 4 years ago

I actually just fixed this yesterday, but forgot to push it. Thanks for the effort though!