diff --git a/src/main/java/me/modmuss50/optifabric/compat/MixinNodeTransformer.java b/src/main/java/me/modmuss50/optifabric/compat/MixinNodeTransformer.java index a07d3415..e50a2677 100644 --- a/src/main/java/me/modmuss50/optifabric/compat/MixinNodeTransformer.java +++ b/src/main/java/me/modmuss50/optifabric/compat/MixinNodeTransformer.java @@ -2,7 +2,7 @@ import com.google.common.collect.Lists; import me.modmuss50.optifabric.compat.fix.IMixinFixer; -import me.modmuss50.optifabric.mod.OptifabricSetup; +import me.modmuss50.optifabric.patcher.fixes.ClassFixer; import me.modmuss50.optifabric.util.MixinInternals; import org.objectweb.asm.Opcodes; import org.objectweb.asm.Type; @@ -11,7 +11,6 @@ import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Slice; -import org.spongepowered.asm.mixin.injection.Surrogate; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.struct.InjectionInfo; @@ -82,43 +81,6 @@ public void transformMethods(Predicate filter, Consumermust include all the parameters of - * the original injector (regardless of order). Logs a warning if no - * method annotated with {@link Inject} matching the given name is found in the - * {@link MixinNodeTransformer#mixinNode}. - *

A parameter index refers to the index of the type in the array - * obtained via {@link Type#getArgumentTypes(String desc)}. The {@code this} - * reference for non-static injectors and "wide" types are automatically - * handled.

- * @param name name of the orphaned injector - * @param desc descriptor of the surrogate - * @param params indices of the parameters that will be passed - * to the injector - */ - public void placeSurrogate(String name, String desc, int[] params) { - Optional optional = mixinNode.methods.stream() - .filter(method -> name.equals(method.name) && Annotations.getVisible(method, Inject.class) != null) - .findFirst(); - if (!optional.isPresent()) { - OptifabricSetup.LOGGER.warn("Could not find injector method {} in {}, skipping", name, mixinInfo); - return; - } - MethodNode method = optional.get(); - MethodNode surrogate = new MethodNode(method.access, method.name, desc, null, method.exceptions.toArray(new String[0])); - Annotations.setVisible(surrogate, Surrogate.class); - Type[] args = Type.getArgumentTypes(desc); - for (int i : params) { - surrogate.instructions.add(new VarInsnNode(args[i].getOpcode(Opcodes.IALOAD), i)); - } - boolean isStatic = Modifier.isStatic(method.access); - boolean isPrivate = Modifier.isPrivate(method.access); - int invokeOpcode = isStatic ? Opcodes.INVOKESTATIC : isPrivate ? Opcodes.INVOKESPECIAL : Opcodes.INVOKEVIRTUAL; - surrogate.instructions.add(new MethodInsnNode(invokeOpcode, mixinInfo.getClassRef(), method.name, method.desc)); - surrogate.instructions.add(new InsnNode(Opcodes.RETURN)); - } - /** * An abstraction over raw ASM that aids in patching * methods from another mod's mixin. @@ -167,6 +129,24 @@ public void setMethod(String... method) { updateClassInfo = true; } + /** + * Sets the {@code at} key of the injector. If the + * injector takes an array of {@link At}s the array + * will be replaced with one that contains only the + * given {@code at}. Use only if a {@link ClassFixer} + * can't (or shouldn't) be used. + * @param atNode {@link AtNode} that constructs an {@link At} + * annotation from the given {@code value} and {@code target} + */ + public void setAt(AtNode atNode) { + Object at = Annotations.getValue(injector, "at"); + if (at instanceof AnnotationNode) { + Annotations.setValue(injector, "at", atNode.at); + } else if (at instanceof Collection) { + Annotations.setValue(injector, "at", Collections.singletonList(atNode.at)); + } + } + /** * Sets the {@code ordinal} key of the injector's {@code at}. Preferably * used in conjunction with {@link #setSlice} in order to minimize the diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererMixin.java deleted file mode 100644 index 92d0ad5c..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -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 me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("me/shedaniel/architectury/mixin/fabric/client/MixinGameRenderer") -abstract class GameRendererMixin { - @Shim - private native void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", ordinal = 0), - locals = LocalCapture.CAPTURE_FAILHARD, - cancellable = true) - private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, MatrixStack matrices) { - renderScreenPre(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0), - locals = LocalCapture.CAPTURE_FAILHARD) - private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, MatrixStack matrices) { - renderScreenPost(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNew4erMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNew4erMixin.java deleted file mode 100644 index d5b5ff73..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNew4erMixin.java +++ /dev/null @@ -1,46 +0,0 @@ -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewMixin.java deleted file mode 100644 index 9991ac6f..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewMixin.java +++ /dev/null @@ -1,47 +0,0 @@ -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 net.minecraft.util.math.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 GameRendererNewMixin { - @Shim - private native void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true, - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", ordinal = 0)) - private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - renderScreenPre(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0)) - private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - renderScreenPost(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerMixin.java deleted file mode 100644 index f1f10ec4..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerMixin.java +++ /dev/null @@ -1,47 +0,0 @@ -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 net.minecraft.util.math.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 GameRendererNewerMixin { - @Shim - private native void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, cancellable = true, - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", ordinal = 0)) - private void renderScreenPre(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - renderScreenPre(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILHARD, - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0)) - private void renderScreenPost(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - renderScreenPost(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewererMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewererMixin.java deleted file mode 100644 index e3d4a4a3..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewererMixin.java +++ /dev/null @@ -1,47 +0,0 @@ -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 net.minecraft.util.math.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 GameRendererNewererMixin { - @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;render(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;render(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); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerererMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerererMixin.java deleted file mode 100644 index 15003892..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/GameRendererNewerererMixin.java +++ /dev/null @@ -1,47 +0,0 @@ -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/SpriteAtlasTextureMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/SpriteAtlasTextureMixin.java deleted file mode 100644 index 71601ca4..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/SpriteAtlasTextureMixin.java +++ /dev/null @@ -1,38 +0,0 @@ -package me.modmuss50.optifabric.compat.architectury.mixin; - -import java.util.Set; -import java.util.stream.Stream; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.texture.SpriteAtlasTexture.Data; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(SpriteAtlasTexture.class) -@InterceptingMixin("me/shedaniel/architectury/mixin/fabric/client/MixinTextureAtlas") -abstract class SpriteAtlasTextureMixin { - @PlacatingSurrogate - private void preStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels) { - } - - @Inject(method = "stitch", - at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0), - locals = LocalCapture.CAPTURE_FAILHARD) - private void preStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels, Set set) { - preStitch(resourceManager, idStream, profiler, mipmapLevels, call, set); - } - - @Shim - private native void preStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, Set set); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/SpriteAtlasTextureNewMixin.java b/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/SpriteAtlasTextureNewMixin.java deleted file mode 100644 index 422e8a5c..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/architectury/mixin/SpriteAtlasTextureNewMixin.java +++ /dev/null @@ -1,37 +0,0 @@ -package me.modmuss50.optifabric.compat.architectury.mixin; - -import java.util.Set; -import java.util.stream.Stream; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.texture.SpriteAtlasTexture.Data; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(SpriteAtlasTexture.class) -@InterceptingMixin("dev/architectury/mixin/fabric/client/MixinTextureAtlas") -abstract class SpriteAtlasTextureNewMixin { - @PlacatingSurrogate - private void preStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels) { - } - - @Inject(method = "stitch", locals = LocalCapture.CAPTURE_FAILHARD, - at = @At(value = "INVOKE_STRING", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", args = "ldc=extracting_frames")) - private void preStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels, Set set) { - preStitch(resourceManager, idStream, profiler, mipmapLevels, call, set); - } - - @Shim - private native void preStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, Set set); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/CharmMixinPlugin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/CharmMixinPlugin.java deleted file mode 100644 index ca4cd252..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/CharmMixinPlugin.java +++ /dev/null @@ -1,44 +0,0 @@ -package me.modmuss50.optifabric.compat.charm; - -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.tree.ClassNode; -import org.objectweb.asm.tree.InsnList; -import org.objectweb.asm.tree.InsnNode; -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 CharmMixinPlugin extends InterceptingMixinPlugin { - @Override - public void preApply(String targetClassName, ClassNode targetClass, String mixinClassName, IMixinInfo mixinInfo) { - if ("UtilMixin".equals(mixinInfo.getName())) { - String desc = "(Lcom/mojang/datafixers/DSL$TypeReference;Ljava/lang/String;)Lcom/mojang/datafixers/types/Type;"; - String getChoiceTypeInternal = RemappingUtils.getMethodName("class_156", "method_29191", desc); //Util, getChoiceTypeInternal - - for (MethodNode method : targetClass.methods) { - if (getChoiceTypeInternal.equals(method.name) && desc.equals(method.desc)) { - LabelNode skip = new LabelNode(); - - InsnList extra = new InsnList(); - extra.add(new JumpInsnNode(Opcodes.GOTO, skip)); - extra.add(new InsnNode(Opcodes.ACONST_NULL)); - extra.add(new InsnNode(Opcodes.ACONST_NULL)); - extra.add(new InsnNode(Opcodes.ACONST_NULL)); - extra.add(new MethodInsnNode(Opcodes.INVOKEINTERFACE, "org/apache/logging/log4j/Logger", "error", "(Ljava/lang/String;Ljava/lang/Object;)V", true)); - extra.add(skip); - - method.instructions.insertBefore(method.instructions.getLast(), extra); - break; - } - } - } - - super.preApply(targetClassName, targetClass, mixinClassName, mixinInfo); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/BlockEntityRenderDispatcherMixin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/BlockEntityRenderDispatcherMixin.java deleted file mode 100644 index b988001e..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/BlockEntityRenderDispatcherMixin.java +++ /dev/null @@ -1,35 +0,0 @@ -package me.modmuss50.optifabric.compat.charm.mixin; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -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.block.entity.BlockEntity; -import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher; -import net.minecraft.client.render.block.entity.BlockEntityRenderer; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.world.World; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(BlockEntityRenderDispatcher.class) -@InterceptingMixin("svenhjol/charm/mixin/storage_labels/CallStorageLabelsRenderMixin") -abstract class BlockEntityRenderDispatcherMixin { - @PlacatingSurrogate - private static void hookExtraRender(BlockEntityRenderer renderer, BlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, CallbackInfo call, World world) { - } - - @Inject(method = "render(Lnet/minecraft/client/render/block/entity/BlockEntityRenderer;Lnet/minecraft/block/entity/BlockEntity;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;)V", - at = @At("TAIL"), locals = LocalCapture.CAPTURE_FAILHARD) - private static void hookExtraRender(BlockEntityRenderer renderer, BlockEntity blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, CallbackInfo call, World world, int light) { - hookExtraRender(renderer, blockEntity, tickDelta, matrices, vertexConsumers, call, light); - } - - @Shim - private static native void hookExtraRender(BlockEntityRenderer renderer, T blockEntity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, CallbackInfo call, int light); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/SpriteAtlasTextureMixin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/SpriteAtlasTextureMixin.java deleted file mode 100644 index 91c2535a..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/SpriteAtlasTextureMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package me.modmuss50.optifabric.compat.charm.mixin; - -import java.util.Set; -import java.util.stream.Stream; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.texture.SpriteAtlasTexture.Data; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(SpriteAtlasTexture.class) -@InterceptingMixin("svenhjol/charm/mixin/callback/StitchTextureCallbackMixin") -class SpriteAtlasTextureMixin { - @PlacatingSurrogate - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels) { - } - - @Inject(method = "stitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels, Set set) { - hookStitch(resourceManager, idStream, profiler, mipmapLevels, call, set); - } - - @Shim - private native void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, Set set); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/SpriteAtlasTextureNewMixin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/SpriteAtlasTextureNewMixin.java deleted file mode 100644 index 8ab08fd9..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/SpriteAtlasTextureNewMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package me.modmuss50.optifabric.compat.charm.mixin; - -import java.util.Set; -import java.util.stream.Stream; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.texture.SpriteAtlasTexture.Data; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(SpriteAtlasTexture.class) -@InterceptingMixin("svenhjol/charm/mixin/event/StitchTextureMixin") -class SpriteAtlasTextureNewMixin { - @PlacatingSurrogate - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels) { - } - - @Inject(method = "stitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels, Set set) { - hookStitch(resourceManager, idStream, profiler, mipmapLevels, call, set); - } - - @Shim - private native void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, Set set); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/old/SpriteAtlasTextureMixin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/old/SpriteAtlasTextureMixin.java deleted file mode 100644 index 7aa50b44..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/old/SpriteAtlasTextureMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package me.modmuss50.optifabric.compat.charm.mixin.old; - -import java.util.Set; -import java.util.stream.Stream; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.texture.SpriteAtlasTexture.Data; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(SpriteAtlasTexture.class) -@InterceptingMixin("svenhjol/charm/mixin/SpriteAtlasTextureMixin") -class SpriteAtlasTextureMixin { - @PlacatingSurrogate - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels) { - } - - @Inject(method = "stitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels, Set set) { - hookStitch(resourceManager, idStream, profiler, mipmapLevels, call, set); - } - - @Shim - private native void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, Set set); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/old/UtilMixin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/old/UtilMixin.java deleted file mode 100644 index 93cc0036..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/old/UtilMixin.java +++ /dev/null @@ -1,26 +0,0 @@ -package me.modmuss50.optifabric.compat.charm.mixin.old; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; - -import com.mojang.datafixers.DSL.TypeReference; -import com.mojang.datafixers.types.Type; - -import net.minecraft.util.Util; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(Util.class) -@InterceptingMixin("svenhjol/charm/mixin/UtilMixin") -abstract class UtilMixin { - @Inject(method = "getChoiceTypeInternal", at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;debug(Ljava/lang/String;Ljava/lang/Object;)V", remap = false), cancellable = true) - private static void optifabric_hookAttemptDataFixInternal(TypeReference type, String id, CallbackInfoReturnable> call) { - hookAttemptDataFixInternal(type, id, call); - } - - @Shim - private static native void hookAttemptDataFixInternal(TypeReference type, String id, CallbackInfoReturnable> call); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/older/SpriteAtlasTextureMixin.java b/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/older/SpriteAtlasTextureMixin.java deleted file mode 100644 index 40977713..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/charm/mixin/older/SpriteAtlasTextureMixin.java +++ /dev/null @@ -1,36 +0,0 @@ -package me.modmuss50.optifabric.compat.charm.mixin.older; - -import java.util.Set; -import java.util.stream.Stream; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; - -import net.minecraft.client.texture.SpriteAtlasTexture; -import net.minecraft.client.texture.SpriteAtlasTexture.Data; -import net.minecraft.resource.ResourceManager; -import net.minecraft.util.Identifier; -import net.minecraft.util.profiler.Profiler; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(SpriteAtlasTexture.class) -@InterceptingMixin("svenhjol/meson/mixin/SpriteAtlasTextureMixin") -class SpriteAtlasTextureMixin { - @PlacatingSurrogate - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels) { - } - - @Inject(method = "stitch", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", ordinal = 0), locals = LocalCapture.CAPTURE_FAILHARD) - private void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, int mipmapLevels, Set set) { - hookStitch(resourceManager, idStream, profiler, mipmapLevels, call, set); - } - - @Shim - private native void hookStitch(ResourceManager resourceManager, Stream idStream, Profiler profiler, int mipmapLevel, CallbackInfoReturnable call, Set set); -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/DummyMixinGameRenderer.java b/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/DummyMixinGameRenderer.java deleted file mode 100644 index ddb40df1..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/DummyMixinGameRenderer.java +++ /dev/null @@ -1,32 +0,0 @@ -package me.modmuss50.optifabric.compat.cloth.mixin; - -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -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 me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("me/shedaniel/cloth/mixin/client/events/MixinGameRenderer") -public class DummyMixinGameRenderer { - // Taken from https://github.com/shedaniel/cloth-api/blob/3913836e59e1df9058ece3e791ee0f5993b8bc00/cloth-client-events-v0/src/main/java/me/shedaniel/cloth/mixin/client/events/MixinGameRenderer.java#L49 - @Inject(method = "render(FJZ)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = At.Shift.AFTER, ordinal = 0), locals = LocalCapture.CAPTURE_FAILEXCEPTION) - public void optifabric_renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, MatrixStack matrices) { - renderScreen(tickDelta, startTime, tick, ci, mouseX, mouseY, matrices); - } - - @Shim - public native void renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window) { - } -} diff --git a/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/GameRendererNewMixin.java b/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/GameRendererNewMixin.java deleted file mode 100644 index 45f75530..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/GameRendererNewMixin.java +++ /dev/null @@ -1,34 +0,0 @@ -package me.modmuss50.optifabric.compat.cloth.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 net.minecraft.util.math.Matrix4f; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("me/shedaniel/cloth/mixin/client/events/MixinGameRenderer") -abstract class GameRendererNewMixin { - @Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILEXCEPTION, - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0)) - private void optifabric_renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - renderScreen(tickDelta, startTime, tick, ci, mouseX, mouseY, matrices); - } - - @Shim - public abstract void renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo ci, int mouseX, int mouseY, Window window) { - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/GameRendererNewerMixin.java b/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/GameRendererNewerMixin.java deleted file mode 100644 index afa03d65..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/cloth/mixin/GameRendererNewerMixin.java +++ /dev/null @@ -1,34 +0,0 @@ -package me.modmuss50.optifabric.compat.cloth.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 net.minecraft.util.math.Matrix4f; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("me/shedaniel/cloth/mixin/client/events/MixinGameRenderer") -abstract class GameRendererNewerMixin { - @Inject(method = "render(FJZ)V", locals = LocalCapture.CAPTURE_FAILEXCEPTION, - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(Lnet/minecraft/client/util/math/MatrixStack;IIF)V", shift = Shift.AFTER, ordinal = 0)) - private void optifabric_renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window, float guiFarPlane, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - renderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - public abstract void renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void renderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererMixin.java b/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererMixin.java deleted file mode 100644 index 955ff0af..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -package me.modmuss50.optifabric.compat.fabricscreenapi.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 me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("net/fabricmc/fabric/mixin/screen/GameRendererMixin") -abstract class GameRendererMixin { - @Shim - private native void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(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, MatrixStack matrices) { - onBeforeRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(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, MatrixStack matrices) { - onAfterRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew3erMixin.java b/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew3erMixin.java deleted file mode 100644 index 1def470a..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew3erMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew4erMixin.java b/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew4erMixin.java deleted file mode 100644 index 32858d4f..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNew4erMixin.java +++ /dev/null @@ -1,49 +0,0 @@ -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); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewMixin.java b/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewMixin.java deleted file mode 100644 index 07d1ed57..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewMixin.java +++ /dev/null @@ -1,50 +0,0 @@ -package me.modmuss50.optifabric.compat.fabricscreenapi.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 net.minecraft.util.math.Matrix4f; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("net/fabricmc/fabric/mixin/screen/GameRendererMixin") -abstract class GameRendererNewMixin { - @Shim - private native void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(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, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - onBeforeRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(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, Matrix4f projection, MatrixStack modelView, MatrixStack matrices) { - onAfterRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewerMixin.java b/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewerMixin.java deleted file mode 100644 index 6cccf5fd..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewerMixin.java +++ /dev/null @@ -1,50 +0,0 @@ -package me.modmuss50.optifabric.compat.fabricscreenapi.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 net.minecraft.util.math.Matrix4f; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("net/fabricmc/fabric/mixin/screen/GameRendererMixin") -abstract class GameRendererNewerMixin { - @Shim - private native void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(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 modelView, MatrixStack matrices) { - onBeforeRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @Inject(method = "render(FJZ)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;render(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 modelView, MatrixStack matrices) { - onAfterRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewererMixin.java b/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewererMixin.java deleted file mode 100644 index e9d4575d..00000000 --- a/src/main/java/me/modmuss50/optifabric/compat/fabricscreenapi/mixin/GameRendererNewererMixin.java +++ /dev/null @@ -1,51 +0,0 @@ -package me.modmuss50.optifabric.compat.fabricscreenapi.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 org.joml.Matrix4f; - -import net.minecraft.client.render.GameRenderer; -import net.minecraft.client.util.Window; -import net.minecraft.client.util.math.MatrixStack; - -import me.modmuss50.optifabric.compat.InterceptingMixin; -import me.modmuss50.optifabric.compat.PlacatingSurrogate; -import me.modmuss50.optifabric.compat.Shim; - -@Mixin(GameRenderer.class) -@InterceptingMixin("net/fabricmc/fabric/mixin/screen/GameRendererMixin") -abstract class GameRendererNewererMixin { - @Shim - private native void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onBeforeRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @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 modelView, MatrixStack matrices) { - onBeforeRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } - - @Shim - private native void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, MatrixStack matrices); - - @PlacatingSurrogate - private void onAfterRenderScreen(float tickDelta, long startTime, boolean tick, CallbackInfo call, int mouseX, int mouseY, Window window) { - } - - @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 modelView, MatrixStack matrices) { - onAfterRenderScreen(tickDelta, startTime, tick, call, mouseX, mouseY, matrices); - } -} \ No newline at end of file diff --git a/src/main/java/me/modmuss50/optifabric/compat/fix/BlockEntityRenderDispatcherMixinFixer.java b/src/main/java/me/modmuss50/optifabric/compat/fix/BlockEntityRenderDispatcherMixinFixer.java new file mode 100644 index 00000000..f1fb5b3e --- /dev/null +++ b/src/main/java/me/modmuss50/optifabric/compat/fix/BlockEntityRenderDispatcherMixinFixer.java @@ -0,0 +1,23 @@ +package me.modmuss50.optifabric.compat.fix; + +import me.modmuss50.optifabric.compat.MixinNodeTransformer; +import me.modmuss50.optifabric.util.RemappingUtils; + +import java.util.Collections; +import java.util.List; +import java.util.function.IntSupplier; + +public class BlockEntityRenderDispatcherMixinFixer implements IMixinFixer { + @Override + public List getTargets() { + return Collections.singletonList("svenhjol/charm/mixin/storage_labels/CallStorageLabelsRenderMixin"); + } + + @Override + public void fix(MixinNodeTransformer transformer) { + transformer.transformMethods("hookExtraRender", method -> { + IntSupplier lightIndex = method.getIndexCI(false, "I"); + method.addParams(lightIndex, 'L' + RemappingUtils.getClassName("class_1937") + ';'); + }); + } +} diff --git a/src/main/java/me/modmuss50/optifabric/compat/fix/CharmUtilMixinFixer.java b/src/main/java/me/modmuss50/optifabric/compat/fix/CharmUtilMixinFixer.java new file mode 100644 index 00000000..788cc6d0 --- /dev/null +++ b/src/main/java/me/modmuss50/optifabric/compat/fix/CharmUtilMixinFixer.java @@ -0,0 +1,20 @@ +package me.modmuss50.optifabric.compat.fix; + +import me.modmuss50.optifabric.compat.MixinNodeTransformer; + +import java.util.Collections; +import java.util.List; + +public class CharmUtilMixinFixer implements IMixinFixer { + @Override + public List getTargets() { + return Collections.singletonList("svenhjol/charm/mixin/UtilMixin"); + } + + @Override + public void fix(MixinNodeTransformer transformer) { + String target = "Lorg/apache/logging/log4j/Logger;debug(Ljava/lang/String;Ljava/lang/Object;)V"; + transformer.transformMethods("hookAttemptDataFixInternal", method -> method.transformInjector(injector -> + injector.setAt(new MixinNodeTransformer.AtNode("INVOKE", target)))); + } +} diff --git a/src/main/java/me/modmuss50/optifabric/compat/fix/GameRendererMixinFixer.java b/src/main/java/me/modmuss50/optifabric/compat/fix/GameRendererMixinFixer.java new file mode 100644 index 00000000..885b41b5 --- /dev/null +++ b/src/main/java/me/modmuss50/optifabric/compat/fix/GameRendererMixinFixer.java @@ -0,0 +1,65 @@ +package me.modmuss50.optifabric.compat.fix; + +import com.google.common.collect.Lists; +import me.modmuss50.optifabric.compat.MixinNodeTransformer; +import me.modmuss50.optifabric.mod.OptifabricSetup; +import me.modmuss50.optifabric.util.RemappingUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.IntSupplier; + +public class GameRendererMixinFixer implements IMixinFixer { + @Override + public List getTargets() { + return Arrays.asList( + "net/fabricmc/fabric/mixin/screen/GameRendererMixin", + "dev/architectury/mixin/fabric/client/MixinGameRenderer", + "dev/architectury/mixin/fabric/client/MixinGameRenderer013", + "me/shedaniel/architectury/mixin/fabric/client/MixinGameRenderer", + "me/shedaniel/cloth/mixin/client/events/MixinGameRenderer"); + } + + @Override + public void fix(MixinNodeTransformer transformer) { + String window = 'L' + RemappingUtils.getClassName("class_1041") + ';'; + String matrixStack = 'L' + RemappingUtils.getClassName("class_4587") + ';'; + String matrix4f = 'L' + RemappingUtils.getClassName("class_1159") + ';'; + String drawContext = 'L' + RemappingUtils.getClassName("class_332") + ';'; + boolean useMatrix4f = OptifabricSetup.isPresent("minecraft", ">=1.17-alpha.21.10.a"); + boolean useJomlMatrix4F = OptifabricSetup.isPresent("minecraft", ">=1.19.3"); + boolean completeModelView = OptifabricSetup.isPresent("fabric-screen-api-v1", "<1.0.47"); + boolean useDrawContext = OptifabricSetup.isPresent("minecraft", ">=1.20"); + List fabricMethods = Arrays.asList("onBeforeRenderScreen", "onAfterRenderScreen"); + List methods = Lists.newArrayList("renderScreenPre", "renderScreenPost", "renderScreen"); + methods.addAll(fabricMethods); + + transformer.transformMethods(fabricMethods, method -> { + IntSupplier matrixStackIndex = method.getIndexCI(false, matrixStack); + List params = new ArrayList<>(); + params.add(window); //window + if (useMatrix4f) { + if (useJomlMatrix4F) { + params.add("Lorg/joml/Matrix4f;"); //projection + } else { + params.add(matrix4f); //projection + } + if (completeModelView) params.add(matrixStack); //modelView + } + method.addParams(matrixStackIndex, params.toArray(new String[0])); + OptifabricSetup.usingScreenAPI = true; + }); + + transformer.transformMethods(methods, method -> { + if (OptifabricSetup.farPlanePresent) { + IntSupplier windowIndex = method.getIndexCI(true, window); + method.addParams(windowIndex, "F"); //guiFarPlane + } + if (useDrawContext) { + IntSupplier drawContextIndex = method.getIndexCI(false, drawContext); + method.addParams(drawContextIndex, "F"); //guiOffsetZ + } + }); + } +} diff --git a/src/main/java/me/modmuss50/optifabric/compat/fix/ModMixinFixer.java b/src/main/java/me/modmuss50/optifabric/compat/fix/ModMixinFixer.java index d71bb47d..b6a71bce 100644 --- a/src/main/java/me/modmuss50/optifabric/compat/fix/ModMixinFixer.java +++ b/src/main/java/me/modmuss50/optifabric/compat/fix/ModMixinFixer.java @@ -12,8 +12,12 @@ public class ModMixinFixer { private final List classFixes = new ArrayList<>(); private ModMixinFixer() { + addFixer(new BlockEntityRenderDispatcherMixinFixer()); + addFixer(new CharmUtilMixinFixer()); addFixer(new ChunkRendererRegionMixinFixer()); + addFixer(new GameRendererMixinFixer()); addFixer(new ModelLoaderBakerImplFixer()); + addFixer(new TextureAtlasMixinFixer()); } public void addFixer(IMixinFixer fixer) { diff --git a/src/main/java/me/modmuss50/optifabric/compat/fix/TextureAtlasMixinFixer.java b/src/main/java/me/modmuss50/optifabric/compat/fix/TextureAtlasMixinFixer.java new file mode 100644 index 00000000..d37d08f0 --- /dev/null +++ b/src/main/java/me/modmuss50/optifabric/compat/fix/TextureAtlasMixinFixer.java @@ -0,0 +1,33 @@ +package me.modmuss50.optifabric.compat.fix; + +import me.modmuss50.optifabric.compat.MixinNodeTransformer; + +import java.util.Arrays; +import java.util.List; +import java.util.function.IntSupplier; + +public class TextureAtlasMixinFixer implements IMixinFixer { + + @Override + public List getTargets() { + return Arrays.asList( + "me/shedaniel/architectury/mixin/fabric/client/MixinTextureAtlas", + "dev/architectury/mixin/fabric/client/MixinTextureAtlas", + "svenhjol/meson/mixin/SpriteAtlasTextureMixin", + "svenhjol/charm/mixin/SpriteAtlasTextureMixin", + "svenhjol/charm/mixin/event/StitchTextureMixin", + "svenhjol/charm/mixin/callback/StitchTextureCallbackMixin"); + } + + @Override + public void fix(MixinNodeTransformer transformer) { + transformer.transformMethods(Arrays.asList("preStitch", "hookStitch"), method -> { + IntSupplier setIndex = method.getIndexCI(false, "Ljava/util/Set;"); + /* + Normally Optifine's mipmapLevels (lv) should be passed instead of the method argument with the + same name (which Optifine calls maxMipmapLevelIn), but these injectors only care about the set + */ + method.addParams(setIndex, "I"); + }); + } +} diff --git a/src/main/java/me/modmuss50/optifabric/mod/OptifabricSetup.java b/src/main/java/me/modmuss50/optifabric/mod/OptifabricSetup.java index 993e590d..20610f6b 100644 --- a/src/main/java/me/modmuss50/optifabric/mod/OptifabricSetup.java +++ b/src/main/java/me/modmuss50/optifabric/mod/OptifabricSetup.java @@ -172,25 +172,6 @@ public void run() { Mixins.addConfiguration("optifabric.compat.fabric-item-api.mixins.json"); } - if (isPresent("fabric-screen-api-v1")) { - if (isPresent("minecraft", ">=1.20")) { - Mixins.addConfiguration("optifabric.compat.fabric-screen-api.new4er-mixins.json"); - } else if (isPresent("fabric-api", ">=0.81.0")) { - Mixins.addConfiguration("optifabric.compat.fabric-screen-api.new3er-mixins.json"); - } else if (isPresent("minecraft", ">=1.19.3")) { - Mixins.addConfiguration("optifabric.compat.fabric-screen-api.newerer-mixins.json"); - } else if (isPresent("minecraft", ">=1.17-alpha.21.10.a")) { - if (farPlanePresent) { - Mixins.addConfiguration("optifabric.compat.fabric-screen-api.newer-mixins.json"); - } else { - Mixins.addConfiguration("optifabric.compat.fabric-screen-api.new-mixins.json"); - } - } else { - Mixins.addConfiguration("optifabric.compat.fabric-screen-api.mixins.json"); - } - usingScreenAPI = true; - } - if (isPresent("fabric-lifecycle-events-v1", ">=1.4.6") && isPresent("minecraft", "1.17.x")) { Mixins.addConfiguration("optifabric.compat.fabric-lifecycle-events.mixins.json"); } else if (isPresent("fabric-lifecycle-events-v1", ">=2.0.8")) { @@ -202,19 +183,6 @@ public void run() { Mixins.addConfiguration("optifabric.optifine.old-mixins.json"); } - if (isPresent("fabricloader", ">=0.13.0") && (isPresent("cloth-client-events-v0", ">=3.1.58") || isPresent("cloth-client-events-v0", ">=2.1.60 <3.0") || isPresent("cloth-client-events-v0", ">=1.6.59 <2.0"))) { - // no mixins are needed -- cloth had a workaround for https://github.com/FabricMC/Mixin/issues/80 - // but it is now fixed in fabricloader - } else if (isPresent("cloth-client-events-v0", ">=2.0")) { - if (farPlanePresent) { - Mixins.addConfiguration("optifabric.compat.cloth.newer-mixins.json"); - } else { - Mixins.addConfiguration("optifabric.compat.cloth.new-mixins.json"); - } - } else if (isPresent("cloth-client-events-v0")) { - Mixins.addConfiguration("optifabric.compat.cloth.mixins.json"); - } - if (isPresent("clothesline")) { Mixins.addConfiguration("optifabric.compat.clothesline.mixins.json"); } @@ -327,30 +295,6 @@ public void run() { Mixins.addConfiguration("optifabric.compat.age-of-exile.mixins.json"); } - if (isPresent("charm", ">=2.0 <2.1")) { - Mixins.addConfiguration("optifabric.compat.charm-older.mixins.json"); - } else if (isPresent("charm", ">=2.1 <3.0")) { - Mixins.addConfiguration("optifabric.compat.charm-old.mixins.json"); - - if (isPresent("charm", ">=2.2.2")) { - injector.predictFuture(RemappingUtils.getClassName("class_156")).ifPresent(node -> {//Util - String desc = "(Lcom/mojang/datafixers/DSL$TypeReference;Ljava/lang/String;)Lcom/mojang/datafixers/types/Type;"; - String getChoiceTypeInternal = RemappingUtils.getMethodName("class_156", "method_29191", desc); //Util, getChoiceTypeInternal - - for (MethodNode method : node.methods) { - if (getChoiceTypeInternal.equals(method.name) && desc.equals(method.desc)) { - Mixins.addConfiguration("optifabric.compat.charm-plus.mixins.json"); - break; - } - } - }); - } - } else if (isPresent("charm", ">=3.0 <4.0")) { - Mixins.addConfiguration("optifabric.compat.charm.mixins.json"); - } else if (isPresent("charm", ">=4.0")) { - Mixins.addConfiguration("optifabric.compat.charm-new.mixins.json"); - } - if (isPresent("voxelmap")) { Mixins.addConfiguration("optifabric.compat.voxelmap.mixins.json"); } @@ -367,25 +311,6 @@ public void run() { Mixins.addConfiguration("optifabric.compat.images.mixins.json"); } - if (isPresent("architectury", ">=9.0.6")) { - Mixins.addConfiguration("optifabric.compat.architectury-AB.new4er-mixins.json"); - } else if (isPresent("architectury", ">=7.0.52")) { - Mixins.addConfiguration("optifabric.compat.architectury-AB.newererer-mixins.json"); - } else if (isPresent("architectury", ">=3.7")) { - Mixins.addConfiguration("optifabric.compat.architectury-AB.newerer-mixins.json"); - } else if (isPresent("architectury", ">=2.0")) { - assert isPresent("minecraft", ">=1.17-beta.1"); - if (farPlanePresent) { - Mixins.addConfiguration("optifabric.compat.architectury-AB.newer-mixins.json"); - } else { - Mixins.addConfiguration("optifabric.compat.architectury-AB.new-mixins.json"); - } - } else if (isPresent("architectury", ">=1.0.20")) { - Mixins.addConfiguration("optifabric.compat.architectury-B.mixins.json"); - } else if (isPresent("architectury", ">=1.0.4")) { - Mixins.addConfiguration("optifabric.compat.architectury-A.mixins.json"); - } - if (isPresent("frex", ">=4.3")) { Mixins.addConfiguration("optifabric.compat.frex.mixins.json"); } else if (isPresent("frex", "=4.2")) { diff --git a/src/main/resources/optifabric.compat.architectury-A.mixins.json b/src/main/resources/optifabric.compat.architectury-A.mixins.json deleted file mode 100644 index a4f40733..00000000 --- a/src/main/resources/optifabric.compat.architectury-A.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.architectury-AB.new-mixins.json b/src/main/resources/optifabric.compat.architectury-AB.new-mixins.json deleted file mode 100644 index 49362205..00000000 --- a/src/main/resources/optifabric.compat.architectury-AB.new-mixins.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewMixin", - "SpriteAtlasTextureNewMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.architectury-AB.new4er-mixins.json b/src/main/resources/optifabric.compat.architectury-AB.new4er-mixins.json deleted file mode 100644 index 0482316d..00000000 --- a/src/main/resources/optifabric.compat.architectury-AB.new4er-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNew4erMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.architectury-AB.newer-mixins.json b/src/main/resources/optifabric.compat.architectury-AB.newer-mixins.json deleted file mode 100644 index 9e042286..00000000 --- a/src/main/resources/optifabric.compat.architectury-AB.newer-mixins.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewerMixin", - "SpriteAtlasTextureNewMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.architectury-AB.newerer-mixins.json b/src/main/resources/optifabric.compat.architectury-AB.newerer-mixins.json deleted file mode 100644 index f18825e2..00000000 --- a/src/main/resources/optifabric.compat.architectury-AB.newerer-mixins.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewererMixin", - "SpriteAtlasTextureNewMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.architectury-AB.newererer-mixins.json b/src/main/resources/optifabric.compat.architectury-AB.newererer-mixins.json deleted file mode 100644 index 3d927ebe..00000000 --- a/src/main/resources/optifabric.compat.architectury-AB.newererer-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewerererMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.architectury-B.mixins.json b/src/main/resources/optifabric.compat.architectury-B.mixins.json deleted file mode 100644 index 1717d4d9..00000000 --- a/src/main/resources/optifabric.compat.architectury-B.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.compat.architectury-A.mixins.json", - "package": "me.modmuss50.optifabric.compat.architectury.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "SpriteAtlasTextureMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.charm-new.mixins.json b/src/main/resources/optifabric.compat.charm-new.mixins.json deleted file mode 100644 index cbb9bf40..00000000 --- a/src/main/resources/optifabric.compat.charm-new.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.charm.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "SpriteAtlasTextureNewMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.charm-old.mixins.json b/src/main/resources/optifabric.compat.charm-old.mixins.json deleted file mode 100644 index 2c363edb..00000000 --- a/src/main/resources/optifabric.compat.charm-old.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.charm.mixin.old", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "SpriteAtlasTextureMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.charm-older.mixins.json b/src/main/resources/optifabric.compat.charm-older.mixins.json deleted file mode 100644 index ddd5c446..00000000 --- a/src/main/resources/optifabric.compat.charm-older.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.charm.mixin.older", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "SpriteAtlasTextureMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.charm-plus.mixins.json b/src/main/resources/optifabric.compat.charm-plus.mixins.json deleted file mode 100644 index 9663df49..00000000 --- a/src/main/resources/optifabric.compat.charm-plus.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.compat.charm-old.mixins.json", - "package": "me.modmuss50.optifabric.compat.charm.mixin.old", - "plugin": "me.modmuss50.optifabric.compat.charm.CharmMixinPlugin", - "mixins": [ - "UtilMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.charm.mixins.json b/src/main/resources/optifabric.compat.charm.mixins.json deleted file mode 100644 index e83a70ad..00000000 --- a/src/main/resources/optifabric.compat.charm.mixins.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.charm.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "BlockEntityRenderDispatcherMixin", - "SpriteAtlasTextureMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.cloth.mixins.json b/src/main/resources/optifabric.compat.cloth.mixins.json deleted file mode 100644 index 682b6cde..00000000 --- a/src/main/resources/optifabric.compat.cloth.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.cloth.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "DummyMixinGameRenderer" - ] -} diff --git a/src/main/resources/optifabric.compat.cloth.new-mixins.json b/src/main/resources/optifabric.compat.cloth.new-mixins.json deleted file mode 100644 index 7782b6a8..00000000 --- a/src/main/resources/optifabric.compat.cloth.new-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.cloth.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.cloth.newer-mixins.json b/src/main/resources/optifabric.compat.cloth.newer-mixins.json deleted file mode 100644 index 773c5a2d..00000000 --- a/src/main/resources/optifabric.compat.cloth.newer-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.cloth.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewerMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.fabric-screen-api.mixins.json b/src/main/resources/optifabric.compat.fabric-screen-api.mixins.json deleted file mode 100644 index fab09f74..00000000 --- a/src/main/resources/optifabric.compat.fabric-screen-api.mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.fabricscreenapi.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.fabric-screen-api.new-mixins.json b/src/main/resources/optifabric.compat.fabric-screen-api.new-mixins.json deleted file mode 100644 index 5dd9c267..00000000 --- a/src/main/resources/optifabric.compat.fabric-screen-api.new-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.fabricscreenapi.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.fabric-screen-api.new3er-mixins.json b/src/main/resources/optifabric.compat.fabric-screen-api.new3er-mixins.json deleted file mode 100644 index 6874bcbc..00000000 --- a/src/main/resources/optifabric.compat.fabric-screen-api.new3er-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.fabricscreenapi.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNew3erMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.fabric-screen-api.new4er-mixins.json b/src/main/resources/optifabric.compat.fabric-screen-api.new4er-mixins.json deleted file mode 100644 index 90213257..00000000 --- a/src/main/resources/optifabric.compat.fabric-screen-api.new4er-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.fabricscreenapi.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNew4erMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.fabric-screen-api.newer-mixins.json b/src/main/resources/optifabric.compat.fabric-screen-api.newer-mixins.json deleted file mode 100644 index 8074e930..00000000 --- a/src/main/resources/optifabric.compat.fabric-screen-api.newer-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.fabricscreenapi.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewerMixin" - ] -} \ No newline at end of file diff --git a/src/main/resources/optifabric.compat.fabric-screen-api.newerer-mixins.json b/src/main/resources/optifabric.compat.fabric-screen-api.newerer-mixins.json deleted file mode 100644 index 53d66a29..00000000 --- a/src/main/resources/optifabric.compat.fabric-screen-api.newerer-mixins.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "parent": "optifabric.mixins.json", - "package": "me.modmuss50.optifabric.compat.fabricscreenapi.mixin", - "plugin": "me.modmuss50.optifabric.compat.InterceptingMixinPlugin", - "mixins": [ - "GameRendererNewererMixin" - ] -} \ No newline at end of file diff --git a/src/shim/java/org/joml/Matrix4f.java b/src/shim/java/org/joml/Matrix4f.java deleted file mode 100644 index da7bfe79..00000000 --- a/src/shim/java/org/joml/Matrix4f.java +++ /dev/null @@ -1,4 +0,0 @@ -package org.joml; - -public class Matrix4f { -} \ No newline at end of file