diff --git a/Common/src/main/java/customskinloader/fake/itf/FakeInterfaceManager.java b/Common/src/main/java/customskinloader/fake/itf/FakeInterfaceManager.java index ab8eec6..c0494b2 100644 --- a/Common/src/main/java/customskinloader/fake/itf/FakeInterfaceManager.java +++ b/Common/src/main/java/customskinloader/fake/itf/FakeInterfaceManager.java @@ -27,6 +27,10 @@ public static int NativeImage_getPixel(Object nativeImage, int x, int y) { return ((IFakeNativeImage) nativeImage).getPixel(x, y); } + public static void NativeImage_setPixel(Object nativeImage, int x, int y, int color) { + ((IFakeNativeImage) nativeImage).setPixel(x, y, color); + } + public static GameProfile SkinManagerCacheKey_profile(Object skinManagerCacheKey) { return ((IFakeSkinManagerCacheKey) skinManagerCacheKey).profile(); } diff --git a/Common/src/main/java/customskinloader/fake/itf/IFakeNativeImage.java b/Common/src/main/java/customskinloader/fake/itf/IFakeNativeImage.java index 1440c40..063d8c1 100644 --- a/Common/src/main/java/customskinloader/fake/itf/IFakeNativeImage.java +++ b/Common/src/main/java/customskinloader/fake/itf/IFakeNativeImage.java @@ -6,4 +6,8 @@ public interface IFakeNativeImage { default int getPixel(int x, int y) { return ((NativeImage) this).func_195709_a(x, y); } + + default void setPixel(int x, int y, int color) { + ((NativeImage) this).func_195700_a(x, y, color); + } } diff --git a/Common/src/main/java/customskinloader/fake/texture/FakeNativeImage.java b/Common/src/main/java/customskinloader/fake/texture/FakeNativeImage.java index 5e03d6a..4c6adc4 100644 --- a/Common/src/main/java/customskinloader/fake/texture/FakeNativeImage.java +++ b/Common/src/main/java/customskinloader/fake/texture/FakeNativeImage.java @@ -41,7 +41,7 @@ public int getRGBA(int x, int y) { } public void setRGBA(int x, int y, int rgba) { - image.func_195700_a(x, y, rgba); + FakeInterfaceManager.NativeImage_setPixel(image, x, y, rgba); } public void copyImageData(FakeImage image) { diff --git a/Fabric/Fabric.tsrg b/Fabric/Fabric.tsrg index af6a7b3..7e5998b 100644 --- a/Fabric/Fabric.tsrg +++ b/Fabric/Fabric.tsrg @@ -9,6 +9,7 @@ customskinloader/fake/itf/IFakeMinecraft customskinloader/fake/itf/IFakeMinecraf func_195551_G ()Lnet/minecraft/resources/IResourceManager; method_1478 customskinloader/fake/itf/IFakeNativeImage customskinloader/fake/itf/IFakeNativeImage getPixel (II)I method_61940 + setPixel (III)V method_61941 customskinloader/fake/itf/IFakeSkinManagerCacheKey customskinloader/fake/itf/IFakeSkinManagerCacheKey profile ()Lcom/mojang/authlib/GameProfile; comp_1631 packedTextures ()Lcom/mojang/authlib/properties/Property; comp_2011 diff --git a/Fabric/src/main/java/customskinloader/fabric/DevEnvRemapper.java b/Fabric/src/main/java/customskinloader/fabric/DevEnvRemapper.java index 382bc46..4d29da0 100644 --- a/Fabric/src/main/java/customskinloader/fabric/DevEnvRemapper.java +++ b/Fabric/src/main/java/customskinloader/fabric/DevEnvRemapper.java @@ -35,10 +35,17 @@ public class DevEnvRemapper extends SimpleRemapper { Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager") ) ); + remappedClasses.put( + "net.minecraft.class_1011", + new AbstractMap.SimpleEntry<>( + Lists.newArrayList("customskinloader.fake.itf.IFakeNativeImage"), + Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager") + ) + ); remappedClasses.put( "net.minecraft.class_3298", new AbstractMap.SimpleEntry<>( - Lists.newArrayList("customskinloader.fake.itf.IFakeIResource"), + Lists.newArrayList("customskinloader.fake.itf.IFakeIResource$V1", "customskinloader.fake.itf.IFakeIResource$V2"), Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager") ) ); @@ -49,6 +56,13 @@ public class DevEnvRemapper extends SimpleRemapper { Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager") ) ); + remappedClasses.put( + "net.minecraft.class_1071$class_8686", + new AbstractMap.SimpleEntry<>( + Lists.newArrayList("customskinloader.fake.itf.IFakeSkinManagerCacheKey"), + Lists.newArrayList("customskinloader.fake.itf.FakeInterfaceManager") + ) + ); } @SuppressWarnings("unchecked") diff --git a/Forge/V2/Forge.tsrg b/Forge/V2/Forge.tsrg index 95b9cd0..2473b21 100644 --- a/Forge/V2/Forge.tsrg +++ b/Forge/V2/Forge.tsrg @@ -9,6 +9,7 @@ customskinloader/fake/itf/IFakeMinecraft customskinloader/fake/itf/IFakeMinecraf func_195551_G ()Lnet/minecraft/resources/IResourceManager; m_91098_ customskinloader/fake/itf/IFakeNativeImage customskinloader/fake/itf/IFakeNativeImage getPixel (II)I getPixel + setPixel (III)V setPixel customskinloader/fake/itf/IFakeSkinManagerCacheKey customskinloader/fake/itf/IFakeSkinManagerCacheKey profile ()Lcom/mojang/authlib/GameProfile; f_290972_ packedTextures ()Lcom/mojang/authlib/properties/Property; f_303729_ diff --git a/Forge/V3/Forge.tsrg b/Forge/V3/Forge.tsrg index 0f9ed89..f336773 100644 --- a/Forge/V3/Forge.tsrg +++ b/Forge/V3/Forge.tsrg @@ -9,6 +9,7 @@ customskinloader/fake/itf/IFakeMinecraft customskinloader/fake/itf/IFakeMinecraf func_195551_G ()Lnet/minecraft/resources/IResourceManager; getResourceManager customskinloader/fake/itf/IFakeNativeImage customskinloader/fake/itf/IFakeNativeImage getPixel (II)I getPixel + setPixel (III)V setPixel customskinloader/fake/itf/IFakeSkinManagerCacheKey customskinloader/fake/itf/IFakeSkinManagerCacheKey profile ()Lcom/mojang/authlib/GameProfile; profile packedTextures ()Lcom/mojang/authlib/properties/Property; packedTextures diff --git a/build.properties b/build.properties index 3e3d0c1..660a99b 100644 --- a/build.properties +++ b/build.properties @@ -1,3 +1,3 @@ name=CustomSkinLoader group=customskinloader -version=14.21.1 +version=14.21.2