isXander / isXander/YetAnotherConfigLib

Strange NoSuchMethodError when adding a custom controller widget

Open
#216 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
155
Forks
68
PR merge metrics
No merged PRs in 30d

Description

My mod adds a custom controller widget to have a custom button in the config menu. However when I click on the button, nothing happens.
Upon further investigating via temporary mixin to trace where it's failing, there seems to be a weird bug where my mod does not recognize some of the methods in YACL.

java.lang.NoSuchMethodError: 'boolean io.github.kabanfriends.craftgr.config.controller.RadioStateController$Element.mouseClicked(double, double, int)'

This obviously is false as RadioStateController$Element extends ControllerWidget which extends AbstractWidget which implements GuiEventHandler.
Is there any correct way to implement a custom controller widget so that this error does not happen?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with common/src/main/java/io/github/kabanfriends/craftgr/config/controller/RadioStateController.java at the linked Element implementation, then trace the custom controller widget's click path and the YACL widget API it relies on. Reproduce the button click and inspect the NoSuchMethodError; done means the custom button responds without that error.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.