Cleanroom
Cleanroom copied to clipboard
IClickEventAction and IHoverEventAction
What this pr brings
- The new interfaces,
IHoverEventActionandIClickEventAction, abstractactionprocessing intomethods. - Make
ClickEvent.ActionandHoverEvent.Actionimplement these interfaces and invoke them at the appropriate time. - They wrap a
IHoverEventActionorIClickEventAction, which allows content to be added by anEnumHelper, just like anEnumEnchantmentType. - Dynamic
NAME_MAPPING
What this pr leaves
- The old
NAME_MAPPING. It has not been removed directly to maintain compatibility with Actions added by past mods.
What this pr deletes
<clinit>s of Action, which simply implement NAME_MAPPING- cache the action in method, do not always
if(event.getAction() == XXX)
What this pr could be used for
Enable the modder add some magically cool hover and click effects in a hackinless method!
I noticed that you are modifying GuiScreen, how's this change's compatibility to current mod?
I noticed that you are modifying GuiScreen, how's this change's compatibility to current mod?
I only modified the part that handles HoverEvent and ClickEvent. In theory, there will be no compatibility issues. I will do compatibility testing later.
It seems OK.