Use callback-style events throughout all versions
Removes the need for //#if statements on each and every event handler. Instead we now always use the equivalent Callback and have one central 1.12.2 class which forwards Forge events to the callbacks.
This commit is contained in:
@@ -170,12 +170,7 @@ public class GuiReplayOverlay extends AbstractGuiOverlay<GuiReplayOverlay> {
|
||||
return this;
|
||||
}
|
||||
|
||||
//#if MC>=10800
|
||||
private
|
||||
//#else
|
||||
//$$ public // All event handlers need to be public in 1.7.10
|
||||
//#endif
|
||||
class EventHandler extends EventRegistrations {
|
||||
private class EventHandler extends EventRegistrations {
|
||||
{ on(KeyBindingEventCallback.EVENT, this::onKeyBindingEvent); }
|
||||
private void onKeyBindingEvent() {
|
||||
GameOptions gameSettings = getMinecraft().options;
|
||||
|
||||
Reference in New Issue
Block a user