From c8829bbde450efa10fda7cdd91b2a50aaa70a59d Mon Sep 17 00:00:00 2001 From: TheCSDev Date: Mon, 10 Aug 2026 16:56:15 +0200 Subject: [PATCH] Resolve #33 Reduced priority of `MixinNativeImage` and commented-out its code. In the event this Mixin is ever needed in the future, its reduced priority should keep #33 resolved. --- gradle.properties | 10 +++++----- .../client/mixin/events/MixinNativeImage.java | 13 +++++++------ 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/gradle.properties b/gradle.properties index 10bf9eb..f3b2f7b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -11,7 +11,7 @@ maven.group = com.thecsdev # Mod properties mod.id = tcdcommons -mod.version = 5.5.5 +mod.version = 5.5.6 mod.name = TCDCommons API mod.description = TheCSDev's personal Minecraft modding library. mod.author = TheCSDev @@ -28,7 +28,7 @@ pack.format = 88 minecraft.version = 26.2 # Fabric properties -fabric.loader_version = 0.19.3 +fabric.loader_version = 0.19.2 fabric.api_version = 0.152.1+26.2 # fabric.mod.json properties @@ -38,11 +38,11 @@ fabric.api_version = 0.152.1+26.2 fabric.json.depends.java = >=25 fabric.json.depends.minecraft = ~26.2 - fabric.json.depends.fabricloader = >=0.19.3 - fabric.json.depends.fabric-api = >=0.152.1 + fabric.json.depends.fabricloader = >=0.18.5 + fabric.json.depends.fabric-api = * # Neo-Forge properties -neoforge.version = 26.1.0.7-beta +neoforge.version = 26.2.0.1-beta # neoforge.mods.toml properties net.toml.loaderVersion = [4,) diff --git a/src/main/java/com/thecsdev/commonmc/client/mixin/events/MixinNativeImage.java b/src/main/java/com/thecsdev/commonmc/client/mixin/events/MixinNativeImage.java index 8ed579b..0ce4e5b 100644 --- a/src/main/java/com/thecsdev/commonmc/client/mixin/events/MixinNativeImage.java +++ b/src/main/java/com/thecsdev/commonmc/client/mixin/events/MixinNativeImage.java @@ -2,10 +2,6 @@ import com.mojang.blaze3d.platform.NativeImage; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Redirect; - -import java.nio.ByteBuffer; /** * This {@link Mixin}'s sole purpose is to put image byte data loading up to @@ -13,9 +9,13 @@ * the game even fails to validate PNG properly most the time anyway, so this * is kind of more of a bug fix in a way. */ -@Mixin(value = NativeImage.class) +@Mixin(value = NativeImage.class, priority = -1000) public abstract class MixinNativeImage { + //come to think of it, this mixin is not needed anymore unlike before 5.X. + //should external image loading ever be needed in the future, this mixin + //will return. for now, it is best it not interfere with other mods. + /* @Redirect( method = "read(Lcom/mojang/blaze3d/platform/NativeImage$Format;Ljava/nio/ByteBuffer;)Lcom/mojang/blaze3d/platform/NativeImage;", at = @At( @@ -25,4 +25,5 @@ public abstract class MixinNativeImage require = 0 ) private static void skipPngValidation(ByteBuffer buffer) {} -} \ No newline at end of file + */ +}