aboutsummaryrefslogtreecommitdiff
path: root/versions/1.12.2-forge
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-02 07:38:22 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-07-02 07:38:22 +0700
commita81bc67e90df2fddb8e2b8ad5ac6e13cf7c81032 (patch)
tree939ef5ca9e1911d3fa9186d3c7b8f2f9472952a5 /versions/1.12.2-forge
parent511269ba2d250893481cb55f84ae22cba9ba0dc6 (diff)
downloadOneConfig-a81bc67e90df2fddb8e2b8ad5ac6e13cf7c81032.tar.gz
OneConfig-a81bc67e90df2fddb8e2b8ad5ac6e13cf7c81032.tar.bz2
OneConfig-a81bc67e90df2fddb8e2b8ad5ac6e13cf7c81032.zip
pass a UMatrixStack in HUD API
From 1.17+, most matrix transformations can only be done with a MatrixStack instance, thus to prepare for a OneConfig 1.17+ port this has been done.
Diffstat (limited to 'versions/1.12.2-forge')
-rw-r--r--versions/1.12.2-forge/api/1.12.2-forge.api103
-rw-r--r--versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java3
2 files changed, 105 insertions, 1 deletions
diff --git a/versions/1.12.2-forge/api/1.12.2-forge.api b/versions/1.12.2-forge/api/1.12.2-forge.api
new file mode 100644
index 0000000..ff8ae9e
--- /dev/null
+++ b/versions/1.12.2-forge/api/1.12.2-forge.api
@@ -0,0 +1,103 @@
+public class cc/polyfrost/oneconfig/events/event/ChatReceiveEvent : cc/polyfrost/oneconfig/events/event/CancellableEvent {
+ public final field message Lnet/minecraft/util/text/ITextComponent;
+ public fun <init> (Lnet/minecraft/util/text/ITextComponent;)V
+ public fun getFullyUnformattedMessage ()Ljava/lang/String;
+}
+
+public class cc/polyfrost/oneconfig/events/event/ReceivePacketEvent : cc/polyfrost/oneconfig/events/event/CancellableEvent {
+ public final field packet Lnet/minecraft/network/Packet;
+ public fun <init> (Lnet/minecraft/network/Packet;)V
+}
+
+public class cc/polyfrost/oneconfig/events/event/ScreenOpenEvent : cc/polyfrost/oneconfig/events/event/CancellableEvent {
+ public final field screen Lnet/minecraft/client/gui/GuiScreen;
+ public fun <init> (Lnet/minecraft/client/gui/GuiScreen;)V
+}
+
+public class cc/polyfrost/oneconfig/events/event/SendPacketEvent : cc/polyfrost/oneconfig/events/event/CancellableEvent {
+ public final field packet Lnet/minecraft/network/Packet;
+ public fun <init> (Lnet/minecraft/network/Packet;)V
+}
+
+public class cc/polyfrost/oneconfig/events/event/TimerUpdateEvent {
+ public final field timer Lnet/minecraft/util/Timer;
+ public final field updatedDeltaTicks Z
+ public fun <init> (Lnet/minecraft/util/Timer;Z)V
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/GLPlatformImpl : cc/polyfrost/oneconfig/platform/GLPlatform {
+ public fun <init> ()V
+ public fun drawRect (FFFFI)V
+ public fun drawText (Lcc/polyfrost/oneconfig/libs/universal/UMatrixStack;Ljava/lang/String;FFIZ)F
+ public fun enableStencil ()V
+ public fun getStringWidth (Ljava/lang/String;)I
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/GuiPlatformImpl : cc/polyfrost/oneconfig/platform/GuiPlatform {
+ public fun <init> ()V
+ public fun getCurrentScreen ()Ljava/lang/Object;
+ public fun isInChat ()Z
+ public fun isInDebug ()Z
+ public fun setCurrentScreen (Ljava/lang/Object;)V
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/I18nPlatformImpl : cc/polyfrost/oneconfig/platform/I18nPlatform {
+ public fun <init> ()V
+ public fun format (Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/LoaderPlatformImpl : cc/polyfrost/oneconfig/platform/LoaderPlatform {
+ public fun <init> ()V
+ public fun getActiveModContainer ()Lcc/polyfrost/oneconfig/platform/LoaderPlatform$ActiveMod;
+ public fun hasActiveModContainer ()Z
+ public fun isModLoaded (Ljava/lang/String;)Z
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/MousePlatformImpl : cc/polyfrost/oneconfig/platform/MousePlatform {
+ public fun <init> ()V
+ public fun getDWheel ()I
+ public fun getEventButton ()I
+ public fun getEventButtonState ()Z
+ public fun getMouseDX ()I
+ public fun getMouseDY ()I
+ public fun getMouseX ()I
+ public fun getMouseY ()I
+ public fun isButtonDown (I)Z
+ public fun next ()Z
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/PlatformImpl : cc/polyfrost/oneconfig/platform/Platform {
+ public fun <init> ()V
+ public fun isCallingFromMinecraftThread ()Z
+}
+
+public class cc/polyfrost/oneconfig/platform/impl/ServerPlatformImpl : cc/polyfrost/oneconfig/platform/ServerPlatform {
+ public fun <init> ()V
+ public fun getServerBrand ()Ljava/lang/String;
+ public fun inMultiplayer ()Z
+}
+
+public class cc/polyfrost/oneconfig/utils/commands/PlatformCommandManagerImpl : cc/polyfrost/oneconfig/utils/commands/PlatformCommandManager {
+ public fun <init> ()V
+ public fun createCommand (Lcc/polyfrost/oneconfig/utils/commands/CommandManager$InternalCommand;Lcc/polyfrost/oneconfig/utils/commands/annotations/Command;)V
+}
+
+public final class cc/polyfrost/oneconfig/utils/dsl/DSLsKt {
+ public static final fun getMc ()Lnet/minecraft/client/Minecraft;
+}
+
+public final class cc/polyfrost/oneconfig/utils/dsl/GuiUtilsDSLKt {
+ public static final fun openScreen (Lnet/minecraft/client/gui/GuiScreen;I)V
+ public static synthetic fun openScreen$default (Lnet/minecraft/client/gui/GuiScreen;IILjava/lang/Object;)V
+}
+
+public final class cc/polyfrost/oneconfig/utils/gui/GuiUtils {
+ public fun <init> ()V
+ public static fun closeScreen ()V
+ public static fun displayScreen (Ljava/lang/Object;)V
+ public static fun displayScreen (Lnet/minecraft/client/gui/GuiScreen;)V
+ public static fun displayScreen (Lnet/minecraft/client/gui/GuiScreen;I)V
+ public static fun getDeltaTime ()F
+ public static fun getScreenQueue ()Ljava/util/Deque;
+}
+
diff --git a/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java b/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java
index 6c615c8..775e055 100644
--- a/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java
+++ b/versions/1.12.2-forge/src/main/java/cc/polyfrost/oneconfig/internal/mixin/GuiIngameForgeMixin.java
@@ -2,6 +2,7 @@ package cc.polyfrost.oneconfig.internal.mixin;
import cc.polyfrost.oneconfig.events.EventManager;
import cc.polyfrost.oneconfig.events.event.HudRenderEvent;
+import cc.polyfrost.oneconfig.libs.universal.UMatrixStack;
import net.minecraftforge.client.GuiIngameForge;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -12,6 +13,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public class GuiIngameForgeMixin {
@Inject(method = "renderGameOverlay", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/client/GuiIngameForge;post(Lnet/minecraftforge/client/event/RenderGameOverlayEvent$ElementType;)V", shift = At.Shift.AFTER, remap = false), remap = true)
private void onRenderGameOverlay(float partialTicks, CallbackInfo ci) {
- EventManager.INSTANCE.post(new HudRenderEvent(partialTicks));
+ EventManager.INSTANCE.post(new HudRenderEvent(new UMatrixStack(), partialTicks));
}
} \ No newline at end of file