Posted July 13, 201510 yr Forge Version: 11.14.3.1487 Basic Setup: I've created a Helper Interface for Gui Elements called GuiElement, so my custom Gui Elements provide some basic methods like isHovering(), mouseClick() or setEnabled(). In my case I created a GuiAdvancedTextField, which extends GuiTextField and implements GuiElement. To satisfy the interface, I override void setEnabled(boolean enabled); When calling this Method while in the Development Environment, everything works fine, but after compiling the following error occurs: java.lang.AbstractMethodError: somepackets.GuiAdvancedTextField.setEnabled(Z)V As far as I understand, this is caused by setEnabled both overriding GuiTextField's setEnabled method with the same signature and implementing GuiElement's setEnabled method where GuiTextField doesn't implement GuiElement. Renaming the interface's setEnabled method to setElementEnabled was a functioning workaround. Thanks in advance for the fix, Pixel
July 13, 201510 yr Author Thanks, this worked, but your example was wrong - you need the Method's return type in the signature. What worked for me: srgExtra "MD: my/mod/my/packages/GuiElement/setEnabled (Z)V my/mod/my/packages/GuiElement/func_146184_c (Z)V"
July 13, 201510 yr Author No problem, didn't take too long to figure that out. I've decided to rename the interface's method now anyway, because of the possibility of other "native" Gui Elements having a method with the setEnabled(Z)V signature, and in that case, it wouldn't work again.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.