diff options
Diffstat (limited to 'versions/1.16.2-forge/src/main/java/cc')
-rw-r--r-- | versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/ClientModLoaderMixin.java | 5 | ||||
-rw-r--r-- | versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/KeyboardMixin.java (renamed from versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/KeyboardListenerMixin.java) | 2 | ||||
-rw-r--r-- | versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseAccessor.java (renamed from versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseHelperAccessor.java) | 6 | ||||
-rw-r--r-- | versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseMixin.java (renamed from versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseHelperMixin.java) | 2 | ||||
-rw-r--r-- | versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/TickTimeTrackerMixin.java (renamed from versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/TimeTrackerMixin.java) | 2 |
5 files changed, 10 insertions, 7 deletions
diff --git a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/ClientModLoaderMixin.java b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/ClientModLoaderMixin.java index a3832d0..08ede6e 100644 --- a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/ClientModLoaderMixin.java +++ b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/ClientModLoaderMixin.java @@ -1,8 +1,10 @@ +//#if FORGE==1 package cc.polyfrost.oneconfig.internal.mixin; import cc.polyfrost.oneconfig.events.EventManager; import cc.polyfrost.oneconfig.events.event.InitializationEvent; import cc.polyfrost.oneconfig.internal.OneConfig; +import cc.polyfrost.oneconfig.internal.init.OneConfigInit; import net.minecraftforge.fml.client.ClientModLoader; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; @@ -13,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; public class ClientModLoaderMixin { @Inject(method = "begin", at = @At("HEAD")) private static void onBegin(CallbackInfo ci) { - OneConfig.preLaunch(); + OneConfigInit.initialize(new String[]{}); } @Inject(method = "lambda$finishModLoading$9", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/GameSettings;loadOptions()V", remap = true), remap = false) @@ -22,3 +24,4 @@ public class ClientModLoaderMixin { OneConfig.init(); } } +//#endif
\ No newline at end of file diff --git a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/KeyboardListenerMixin.java b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/KeyboardMixin.java index c7e6327..2a28d66 100644 --- a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/KeyboardListenerMixin.java +++ b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/KeyboardMixin.java @@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(KeyboardListener.class) -public class KeyboardListenerMixin { +public class KeyboardMixin { @Inject(method = "onKeyEvent", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/ForgeHooksClient;fireKeyInput(IIII)V")) private void onKeyEvent(long windowPointer, int key, int scanCode, int action, int modifiers, CallbackInfo ci) { EventManager.INSTANCE.post(new KeyInputEvent()); diff --git a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseHelperAccessor.java b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseAccessor.java index d04ecb1..9cc518d 100644 --- a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseHelperAccessor.java +++ b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseAccessor.java @@ -5,7 +5,7 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.gen.Accessor; @Mixin(MouseHelper.class) -public interface MouseHelperAccessor { - @Accessor - double getAccumulatedScrollDelta(); +public interface MouseAccessor { + @Accessor("accumulatedScrollDelta") + double getEventDeltaWheel(); } diff --git a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseHelperMixin.java b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseMixin.java index 42dd283..525f187 100644 --- a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseHelperMixin.java +++ b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/MouseMixin.java @@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(MouseHelper.class) -public class MouseHelperMixin { +public class MouseMixin { @Inject(method = "mouseButtonCallback", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/ForgeHooksClient;fireMouseInput(III)V")) private void onMouse(long handle, int button, int action, int mods, CallbackInfo ci) { EventManager.INSTANCE.post(new MouseInputEvent()); diff --git a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/TimeTrackerMixin.java b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/TickTimeTrackerMixin.java index dd9920e..572076d 100644 --- a/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/TimeTrackerMixin.java +++ b/versions/1.16.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/TickTimeTrackerMixin.java @@ -13,7 +13,7 @@ import java.util.function.IntSupplier; import java.util.function.LongSupplier; @Mixin(TimeTracker.class) -public class TimeTrackerMixin { +public class TickTimeTrackerMixin { @Inject(method = "<init>", at = @At("RETURN")) private void onStart(LongSupplier longSupplier, IntSupplier intSupplier, CallbackInfo ci) { EventManager.INSTANCE.post(new StartEvent()); |