forked from modmuss50/OptiFabric
-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'llama' into quilt-support
- Loading branch information
Showing
25 changed files
with
488 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNew4erMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package me.modmuss50.optifabric.compat.architectury.mixin; | ||
|
||
import me.modmuss50.optifabric.compat.InterceptingMixin; | ||
import me.modmuss50.optifabric.compat.PlacatingSurrogate; | ||
import me.modmuss50.optifabric.compat.Shim; | ||
import net.minecraft.client.gui.DrawableHelper; | ||
import net.minecraft.client.render.GameRenderer; | ||
import net.minecraft.client.util.Window; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import org.joml.Matrix4f; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.At.Shift; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
@Mixin(GameRenderer.class) | ||
@InterceptingMixin("dev/architectury/mixin/fabric/client/MixinGameRenderer") | ||
abstract class GameRendererNew4erMixin { | ||
@Shim | ||
private native void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, Matrix4f matrix, MatrixStack matrices, DrawableHelper drawContext); | ||
|
||
@PlacatingSurrogate | ||
private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true, | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/class_332;IIF)V", ordinal = 0)) | ||
private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices, float idk, DrawableHelper drawContext) { | ||
renderScreenPre(tickDelta, startTime, tick, ci, mouseX, mouseY, window, matrix, matrices, drawContext); | ||
} | ||
|
||
@Shim | ||
private native void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, Matrix4f matrix, MatrixStack matrices, DrawableHelper drawContext); | ||
|
||
@PlacatingSurrogate | ||
private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/class_332;IIF)V", shift = Shift.AFTER, ordinal = 0)) | ||
private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices, float idk, DrawableHelper drawContext) { | ||
renderScreenPost(tickDelta, startTime, tick, ci, mouseX, mouseY, window, matrix, matrices, drawContext); | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
...in/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerererMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package me.modmuss50.optifabric.compat.architectury.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.At.Shift; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
import net.minecraft.client.render.GameRenderer; | ||
import net.minecraft.client.util.Window; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import org.joml.Matrix4f; | ||
|
||
import me.modmuss50.optifabric.compat.InterceptingMixin; | ||
import me.modmuss50.optifabric.compat.PlacatingSurrogate; | ||
import me.modmuss50.optifabric.compat.Shim; | ||
|
||
@Mixin(GameRenderer.class) | ||
@InterceptingMixin("dev/architectury/mixin/fabric/client/MixinGameRenderer") | ||
abstract class GameRendererNewerererMixin { | ||
@Shim | ||
private native void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, Matrix4f matrix, MatrixStack matrices, MatrixStack matrices2); | ||
|
||
@PlacatingSurrogate | ||
private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true, | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", ordinal = 0)) | ||
private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices, MatrixStack matrices2) { | ||
renderScreenPre(tickDelta, startTime, tick, ci, mouseX, mouseY, window, matrix, matrices, matrices2); | ||
} | ||
|
||
@Shim | ||
private native void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, Matrix4f matrix, MatrixStack matrices, MatrixStack matrices2); | ||
|
||
@PlacatingSurrogate | ||
private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0)) | ||
private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f matrix, MatrixStack matrices, MatrixStack matrices2) { | ||
renderScreenPost(tickDelta, startTime, tick, ci, mouseX, mouseY, window, matrix, matrices, matrices2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
.../java/me/modmuss50/optifabric/compat/borderlessmining/BorderlessMiningNewMixinPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package me.modmuss50.optifabric.compat.borderlessmining; | ||
|
||
public class BorderlessMiningNewMixinPlugin extends BorderlessMiningMixinPlugin { | ||
@Override | ||
protected String getCreateSimpleOptionInitDescriptor() { | ||
return "(Ljava/lang/String;Lnet/minecraft/class_7172$class_7277;Lnet/minecraft/class_7172$class_7303;Lnet/minecraft/class_7172$class_7178;Ljava/lang/Object;Ljava/util/function/Consumer;)V"; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
...odmuss50/optifabric/compat/borderlessmining/mixin/OptionFullscreenResolutionNewMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package me.modmuss50.optifabric.compat.borderlessmining.mixin; | ||
|
||
import me.modmuss50.optifabric.compat.borderlessmining.MagicMixinBridge; | ||
import net.minecraft.client.MinecraftClient; | ||
import net.minecraft.client.gui.screen.Screen; | ||
import net.minecraft.client.gui.screen.option.VideoOptionsScreen; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.Pseudo; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyArgs; | ||
import org.spongepowered.asm.mixin.injection.invoke.arg.Args; | ||
|
||
@Pseudo | ||
@Mixin(targets = "net.optifine.gui.OptionFullscreenResolution", remap = false) | ||
abstract class OptionFullscreenResolutionNewMixin { | ||
@ModifyArgs(method = "make", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/class_7172;<init>(Ljava/lang/String;Lnet/minecraft/class_7172$class_7307;Lnet/minecraft/class_7172$class_7277;Lnet/minecraft/class_7172$class_7178;Ljava/lang/Object;Ljava/util/function/Consumer;)V", remap = true)) | ||
private static void modifyOption(Args args) { | ||
Screen screen = MinecraftClient.getInstance().currentScreen; | ||
((MagicMixinBridge) (screen instanceof MagicMixinBridge ? screen : new VideoOptionsScreen(screen, MinecraftClient.getInstance().options))).optifabric£modifyFullscreenButton(args); | ||
} | ||
} |
74 changes: 74 additions & 0 deletions
74
src/main/java/me/modmuss50/optifabric/compat/fabricrendering/RenderingExtraMixinPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
package me.modmuss50.optifabric.compat.fabricrendering; | ||
|
||
import org.objectweb.asm.Opcodes; | ||
import org.objectweb.asm.tree.AbstractInsnNode; | ||
import org.objectweb.asm.tree.ClassNode; | ||
import org.objectweb.asm.tree.InsnList; | ||
import org.objectweb.asm.tree.JumpInsnNode; | ||
import org.objectweb.asm.tree.LabelNode; | ||
import org.objectweb.asm.tree.MethodInsnNode; | ||
import org.objectweb.asm.tree.MethodNode; | ||
|
||
import org.spongepowered.asm.mixin.extensibility.IMixinInfo; | ||
|
||
import me.modmuss50.optifabric.compat.InterceptingMixinPlugin; | ||
import me.modmuss50.optifabric.util.RemappingUtils; | ||
|
||
public class RenderingExtraMixinPlugin extends InterceptingMixinPlugin { | ||
private static final String FAKE_IDENTIFIER = "me/modmuss50/optifabric/fake/Identifier"; | ||
|
||
@Override | ||
public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
if ("ShaderProgramMixin".equals(mixinInfo.getName())) {//(ResourceFactory, VertexFormat) | ||
String desc = RemappingUtils.mapMethodDescriptor("(Lnet/minecraft/class_5912;Ljava/lang/String;Lnet/minecraft/class_293;)V"); | ||
|
||
for (MethodNode method : targetClass.methods) { | ||
if ("<init>".equals(method.name) && desc.equals(method.desc)) { | ||
String identifier = RemappingUtils.getClassName("class_2960"); | ||
|
||
for (AbstractInsnNode insn : method.instructions) { | ||
if (insn.getType() == AbstractInsnNode.METHOD_INSN && insn.getOpcode() == Opcodes.INVOKESPECIAL) { | ||
MethodInsnNode minsn = (MethodInsnNode) insn; | ||
|
||
if (identifier.equals(minsn.owner) && "<init>".equals(minsn.name) && "(Ljava/lang/String;)V".equals(minsn.desc)) { | ||
minsn.owner = FAKE_IDENTIFIER; | ||
} | ||
} | ||
} | ||
|
||
InsnList extra = new InsnList(); | ||
LabelNode skip = new LabelNode(); | ||
extra.add(new JumpInsnNode(Opcodes.GOTO, skip)); | ||
extra.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, identifier, "<init>", "(Ljava/lang/String;)V", false)); | ||
extra.add(skip); | ||
method.instructions.insertBefore(method.instructions.getLast(), extra); | ||
break; | ||
} | ||
} | ||
} | ||
|
||
super.preApply(targetClassName, targetClass, mixinClassName, mixinInfo); | ||
} | ||
|
||
@Override | ||
public void postApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { | ||
if ("ShaderProgramMixin".equals(mixinInfo.getName())) {//(ResourceFactory, VertexFormat) | ||
String desc = RemappingUtils.mapMethodDescriptor("(Lnet/minecraft/class_5912;Ljava/lang/String;Lnet/minecraft/class_293;)V"); | ||
|
||
for (MethodNode method : targetClass.methods) { | ||
if ("<init>".equals(method.name) && desc.equals(method.desc)) { | ||
String identifier = RemappingUtils.getClassName("class_2960"); | ||
|
||
for (AbstractInsnNode insn : method.instructions) { | ||
if (insn.getType() == AbstractInsnNode.METHOD_INSN && FAKE_IDENTIFIER.equals(((MethodInsnNode) insn).owner)) { | ||
((MethodInsnNode) insn).owner = identifier; | ||
} | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
|
||
super.postApply(targetClassName, targetClass, mixinClassName, mixinInfo); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/main/java/me/modmuss50/optifabric/compat/fabricrendering/mixin/ShaderProgramMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package me.modmuss50.optifabric.compat.fabricrendering.mixin; | ||
|
||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyVariable; | ||
|
||
import net.minecraft.class_5944; | ||
import net.minecraft.util.Identifier; | ||
|
||
import me.modmuss50.optifabric.compat.InterceptingMixin; | ||
import me.modmuss50.optifabric.compat.Shim; | ||
|
||
@Mixin(class_5944.class) | ||
@InterceptingMixin("net/fabricmc/fabric/mixin/client/rendering/shader/ShaderProgramMixin") | ||
abstract class ShaderProgramMixin { | ||
@Shim | ||
private native String modifyProgramId(String id); | ||
|
||
@ModifyVariable(method = "<init>(Lnet/minecraft/class_5912;Lnet/minecraft/util/Identifier;Lnet/minecraft/client/render/VertexFormat;)V", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Identifier;getNamespace()Ljava/lang/String;", ordinal = 0), argsOnly = true, allow = 1) | ||
private Identifier modifyProgramID(Identifier id) { | ||
String in = id.toString(); | ||
String out = modifyProgramId(in); | ||
return in != out ? new Identifier(out) : id; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...in/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew3erMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package me.modmuss50.optifabric.compat.fabricscreenapi.mixin; | ||
|
||
import me.modmuss50.optifabric.compat.InterceptingMixin; | ||
import me.modmuss50.optifabric.compat.PlacatingSurrogate; | ||
import me.modmuss50.optifabric.compat.Shim; | ||
import net.minecraft.client.gui.DrawableHelper; | ||
import net.minecraft.client.render.GameRenderer; | ||
import net.minecraft.client.util.Window; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import org.joml.Matrix4f; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.At.Shift; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
@Mixin(GameRenderer.class) | ||
@InterceptingMixin("net/fabricmc/fabric/mixin/screen/GameRendererMixin") | ||
abstract class GameRendererNew3erMixin { | ||
@Shim | ||
private native void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrixstack, MatrixStack drawContext); | ||
|
||
@PlacatingSurrogate | ||
private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", ordinal = 0), | ||
locals = LocalCapture.CAPTURE_FAILHARD, | ||
cancellable = true) | ||
private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack matrixstack, MatrixStack drawContext) { | ||
onBeforeRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrixstack, drawContext); | ||
} | ||
|
||
@Shim | ||
private native void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrixstack, MatrixStack drawContext); | ||
|
||
@PlacatingSurrogate | ||
private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0), | ||
locals = LocalCapture.CAPTURE_FAILHARD) | ||
private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack matrixstack, MatrixStack drawContext) { | ||
onAfterRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrixstack, drawContext); | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
...in/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew4erMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package me.modmuss50.optifabric.compat.fabricscreenapi.mixin; | ||
|
||
import me.modmuss50.optifabric.compat.InterceptingMixin; | ||
import me.modmuss50.optifabric.compat.PlacatingSurrogate; | ||
import me.modmuss50.optifabric.compat.Shim; | ||
import net.minecraft.client.gui.DrawableHelper; | ||
import net.minecraft.client.render.GameRenderer; | ||
import net.minecraft.client.util.Window; | ||
import net.minecraft.client.util.math.MatrixStack; | ||
import org.joml.Matrix4f; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.At.Shift; | ||
import org.spongepowered.asm.mixin.injection.Inject; | ||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | ||
import org.spongepowered.asm.mixin.injection.callback.LocalCapture; | ||
|
||
@Mixin(GameRenderer.class) | ||
@InterceptingMixin("net/fabricmc/fabric/mixin/screen/GameRendererMixin") | ||
abstract class GameRendererNew4erMixin { | ||
@Shim | ||
private native void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrixstack, DrawableHelper drawContext); | ||
|
||
@PlacatingSurrogate | ||
private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float idk) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/class_332;IIF)V", ordinal = 0), | ||
locals = LocalCapture.CAPTURE_FAILHARD, | ||
cancellable = true) | ||
private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack matrixstack, float idk, DrawableHelper drawContext) { | ||
onBeforeRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrixstack, drawContext); | ||
} | ||
|
||
@Shim | ||
private native void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrixstack, DrawableHelper drawContext); | ||
|
||
@PlacatingSurrogate | ||
private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float idk) { | ||
} | ||
|
||
@Inject(method = "render(FJZ)V", | ||
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderWithTooltip(Lnet/minecraft/class_332;IIF)V", shift = Shift.AFTER, ordinal = 0), | ||
locals = LocalCapture.CAPTURE_FAILHARD) | ||
private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack matrixstack, float idk, DrawableHelper drawContext) { | ||
onAfterRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrixstack, drawContext); | ||
} | ||
} |
Oops, something went wrong.