Controllable (Fabric)

Controllable (Fabric)

1M Downloads

[Question] How do I use the events with the 1.20 version of the mod ?

getItemFromBlock opened this issue ยท 2 comments

commented

Hello, sorry to bother you again.

I am updating my mod for MC 1.20.1, and I can't figure out how to reimplement the events such as ControllerEvent.ButtonInput.
It seems the code changed on Controllable's side, but I did not found any other informations about this.

Could you help me out on this ?

Thanks in advance

commented

In 1.20 and above, all my mods switched to a multiloader design. This means that all events had to be reworked.

You can find the new events here: https://github.com/MrCrayfish/Controllable/blob/multiloader/1.20.X/Common/src/main/java/com/mrcrayfish/controllable/event/ControllerEvents.java

Events can be registered simply by ControllerEvents.<EVENT>.register(...)

BUTTON should be the event you are after.

commented

Thanks, I managed to reimplement almost everything

There is just one last thing left, how can I change the buttons labels shown to the player ?
I implemented a GatherActions class and registered it using ControllerEvents.GATHER_ACTIONS.register(GatherEvent);, but it seems that the event is not being called. Do I have to do something else ?