From c90cea3721991f3562cbdc76f6c4bfab6bfa8019 Mon Sep 17 00:00:00 2001 From: ZekerZhayard Date: Fri, 1 Apr 2022 13:56:20 +0800 Subject: [PATCH] Remove transformers of SkullTileEntity (#207) * Bump to 14.14 * Remove transformers of SkullTileEntity --- .gitignore | 2 + CONTRIBUTING.md | 50 ++++++++++++------- .../customskinloader/config/Config.java | 1 - Fabric/Fabric.tsrg | 1 - Fabric/build.gradle | 26 +++++++++- Fabric/build.properties | 2 +- Fabric/mixin.tsrg | 2 - Fabric/resource/mixins.customskinloader.json | 3 +- .../fabric/MixinConfigPlugin.java | 2 - Forge/Active/Forge.tsrg | 1 - Forge/Active/resource/transformers.js | 2 +- Forge/Legacy/build.properties | 2 +- Forge/Legacy/resource/transformers.js | 25 +--------- .../forge/loader/LaunchWrapper.java | 4 +- .../TileEntitySkullTransformer.java | 38 -------------- Vanilla/1.12.2/1.12.2.tsrg | 1 - Vanilla/1.12.2/mixin.tsrg | 2 - .../resource/mixins.customskinloader.json | 3 +- Vanilla/1.16.5/1.16.5.tsrg | 1 - Vanilla/1.16.5/mixin.tsrg | 2 - .../resource/mixins.customskinloader.json | 3 +- Vanilla/1.17.1/1.17.1.tsrg | 1 - Vanilla/1.17.1/mixin.tsrg | 2 - Vanilla/1.18.2/1.18.2.tsrg | 1 - Vanilla/1.18.2/mixin.tsrg | 2 - Vanilla/1.8.9/1.8.9.tsrg | 1 - Vanilla/1.8.9/mixin.tsrg | 2 - .../resource/mixins.customskinloader.json | 3 +- .../mixin/MixinTileEntitySkull.java | 24 --------- build.properties | 4 +- 30 files changed, 69 insertions(+), 144 deletions(-) delete mode 100644 Forge/Legacy/source/customskinloader/forge/transformer/TileEntitySkullTransformer.java delete mode 100644 Vanilla/Common/source/customskinloader/mixin/MixinTileEntitySkull.java diff --git a/.gitignore b/.gitignore index 3083ba9..a8685dd 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,8 @@ run/ # IDEA .idea/ *.iml +*.ipr +*.iws out/ #mac OS diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12fa053..0024033 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,10 +8,11 @@ ## Running and Testing For now, CustomSkinLoader is unable to run under self development environment, so it needs to add to another development environment as a library. -There are the available versions in different environments below: -| | Forge | Fabric | -|:-:|:-:|:-:| -| Runtime Environment | forge-1.8-11.14.0.1237 ~ 1.13.2-25.0.22
forge-1.13.2-25.0.42 ~ latest | fabric-loader-0.4.3+build.134 ~ latest
Minecraft 18w43b ~ latest
*fabric-api is not required* | +There are the available versions in different environments below: + +| | Forge | Fabric | +|:-----------------------:|:-----------------------------------------------------------------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------:| +| Runtime Environment | forge-1.8-11.14.0.1237 ~ 1.13.2-25.0.22
forge-1.13.2-25.0.42 ~ latest | fabric-loader-0.4.3+build.134 ~ latest
Minecraft 18w43b ~ latest
*fabric-api is not required* | | Development Environment | ForgeGradle-2.1-SNAPSHOT ~ latest
forge-1.8-11.14.3.1503 ~ 1.12.2-14.23.5.2855
forge-1.13.2-25.0.198 ~ latest | fabric-loom-(?) ~ latest
fabric-loader-0.12.0 ~ latest
Minecraft 18w49a ~ latest
*fabric-api is not required* | ### Preliminary steps for testing local builds @@ -26,30 +27,42 @@ There are the available versions in different environments below: ``` 1. Create these folders in the new project directory, then copy the built jar and source jar into it: ``` - Forge: ./local-repo/mods/CustomSkinLoader_Forge/${version} - Fabric: ./local-repo/mods/CustomSkinLoader_Fabric/${version} + Forge 1.8 ~ 1.16.5: ./local-repo/mods/CustomSkinLoader_ForgeLegacy/${version} + Forge 1.17.1 ~ latest: ./local-repo/mods/CustomSkinLoader_ForgeActive/${version} + Fabric: ./local-repo/mods/CustomSkinLoader_Fabric/${version} ``` - *`${version}` should be repalced with something like `14.13-SNAPSHOT-00` manually* -1. Create a pom file in the same folder: - Forge: `CustomSkinLoader_Forge-${version}.pom` + *`${version}` should be repalced with something like `14.14-SNAPSHOT-00` manually* +1. Create a pom file in the same folder: + - Forge 1.8 ~ 1.16.5: `CustomSkinLoader_ForgeLegacy-${version}.pom` ```xml 4.0.0 - customskinloader - CustomSkinLoader_Forge - + mods + CustomSkinLoader_ForgeLegacy + ${version} ``` - Fabric: `CustomSkinLoader_Fabric-${version}.pom` + - Forge 1.17.1 ~ latest: `CustomSkinLoader_ForgeActive-${version}.pom` ```xml 4.0.0 - customskinloader + mods + CustomSkinLoader_ForgeActive + + ${version} + + ``` + - Fabric: `CustomSkinLoader_Fabric-${version}.pom` + ```xml + + + 4.0.0 + mods CustomSkinLoader_Fabric - + ${version} ``` @@ -58,7 +71,7 @@ There are the available versions in different environments below: 1. Add below contents to `build.gradle`: ```gradle dependencies { - deobfCompile "mods:CustomSkinLoader_Forge:14.13-SNAPSHOT-00" + deobfCompile "mods:CustomSkinLoader_ForgeLegacy:14.14-SNAPSHOT-00" } minecraft { @@ -75,7 +88,8 @@ There are the available versions in different environments below: 1. Add below contents to `build.gradle`: ```gradle dependencies { - implementation fg.deobf("mods:CustomSkinLoader_Forge:14.13-SNAPSHOT-00") + implementation fg.deobf("mods:CustomSkinLoader_ForgeLegacy:14.14-SNAPSHOT-00") // Only required for MinecraftForge 1.8 ~ 1.16.5 + implementation fg.deobf("mods:CustomSkinLoader_ForgeActive:14.14-SNAPSHOT-00") // Only required for MinecraftForge 1.17.1 ~ latest } minecraft { @@ -93,7 +107,7 @@ There are the available versions in different environments below: 1. Add below contents to `build.gradle`: ```gradle dependencies { - modImplementation "mods:CustomSkinLoader_Fabric:14.13-SNAPSHOT-00" + modImplementation "mods:CustomSkinLoader_Fabric:14.14-SNAPSHOT-00" } tasks.runClient { diff --git a/Common/source/customskinloader/config/Config.java b/Common/source/customskinloader/config/Config.java index 95a26e5..bcaf695 100644 --- a/Common/source/customskinloader/config/Config.java +++ b/Common/source/customskinloader/config/Config.java @@ -31,7 +31,6 @@ public class Config { public boolean forceIgnoreHttpsCertificate = false; public boolean forceLoadAllTextures=false; public boolean enableCape = true; - public boolean forceFillSkullNBT = false; public int threadPoolSize = 3; public int retryTime = 1; diff --git a/Fabric/Fabric.tsrg b/Fabric/Fabric.tsrg index 0d77673..93e2cf8 100644 --- a/Fabric/Fabric.tsrg +++ b/Fabric/Fabric.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager net/minecraft/class_1071 loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V method_4652 net/minecraft/client/resources/SkinManager$SkinAvailableCallback net/minecraft/class_1071$class_1072 skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V onSkinTextureAvailable -net/minecraft/tileentity/TileEntitySkull net/minecraft/class_2631 net/minecraft/util/ResourceLocation net/minecraft/class_2960 net/minecraft/util/StringUtils net/minecraft/class_3544 stripControlCodes (Ljava/lang/String;)Ljava/lang/String; method_15440 diff --git a/Fabric/build.gradle b/Fabric/build.gradle index b1fa8dc..0ee85c7 100644 --- a/Fabric/build.gradle +++ b/Fabric/build.gradle @@ -32,16 +32,38 @@ import groovy.json.JsonSlurper // Resolve snapshot versions tasks.publishModrinth.doFirst { - gameVersions.removeIf { v -> v.endsWith("-Snapshot") } + def snapshot = [] + gameVersions.groupBy { v -> v.endsWith("-Snapshot") }.with { + this.tasks.publishModrinth.gameVersions = it[false] + snapshot = it[true] + } // The CustomSkinLoader Fabric edition should support all Minecraft snapshot edition. def jsonSlurper = new JsonSlurper() def officialVersionList = [] as Set plugins.withId "net.minecraftforge.gradle.forge", { plugin -> + def currentRelease = null // Get version manifest json. // https://github.com/MinecraftForge/ForgeGradle/blob/fc67182a61926f0bdb0d12da5fba7f4322f64d86/src/main/java/net/minecraftforge/gradle/common/BasePlugin.java#L229 jsonSlurper.parse(plugin.cacheFile("McManifest.json")).versions.each { version -> - officialVersionList << version.id + if (version.type == "snapshot") { + // If the first version is a snapshot, assume the target release version is the same as the assets version. + if (currentRelease == null) { + currentRelease = jsonSlurper.parse(new URL(version.url)).assets.with { + it.toString().split($/\./$).with { "${it[0]}.${it[1]}" } + } + } + } else if (version.type == "release") { + currentRelease = version.id.with { + it.toString().split($/\./$).with { "${it[0]}.${it[1]}" } + } + } else { + // We do not care about other types. + return + } + if (snapshot.contains("${currentRelease}-Snapshot".toString())) { + officialVersionList << version.id + } } } jsonSlurper.parse(new URL("https://meta.fabricmc.net/v2/versions/game")).each { version -> diff --git a/Fabric/build.properties b/Fabric/build.properties index 3e112a3..a369832 100644 --- a/Fabric/build.properties +++ b/Fabric/build.properties @@ -1,5 +1,5 @@ minecraft_version=1.14 -minecraft_full_versions=1.14-Snapshot,1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15-Snapshot,1.15,1.15.1,1.15.2,1.16-Snapshot,1.16,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5,1.17-Snapshot,1.17,1.17.1,1.18-Snapshot,1.18,1.18.1,1.18.2 +minecraft_full_versions=1.14-Snapshot,1.14,1.14.1,1.14.2,1.14.3,1.14.4,1.15-Snapshot,1.15,1.15.1,1.15.2,1.16-Snapshot,1.16,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5,1.17-Snapshot,1.17,1.17.1,1.18-Snapshot,1.18,1.18.1,1.18.2,1.19-Snapshot java_full_versions=8,9,10,11,12,13,14,15,16,17,18 #forge gradle needs forge version forge_mc_version=1.12.2 diff --git a/Fabric/mixin.tsrg b/Fabric/mixin.tsrg index 8edd7fd..f627892 100644 --- a/Fabric/mixin.tsrg +++ b/Fabric/mixin.tsrg @@ -32,6 +32,4 @@ net/minecraft/client/resources/SkinManager net/minecraft/class_1071 net/minecraft/client/resources/SkinManager$SkinAvailableCallback net/minecraft/class_1071$class_1072 net/minecraft/scoreboard/ScoreObjective net/minecraft/class_266 net/minecraft/scoreboard/Scoreboard net/minecraft/class_269 -net/minecraft/tileentity/TileEntitySkull net/minecraft/class_2631 - updateGameProfile (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile; method_11335 net/minecraft/util/ResourceLocation net/minecraft/class_2960 diff --git a/Fabric/resource/mixins.customskinloader.json b/Fabric/resource/mixins.customskinloader.json index 75f2527..eaf3131 100644 --- a/Fabric/resource/mixins.customskinloader.json +++ b/Fabric/resource/mixins.customskinloader.json @@ -10,8 +10,7 @@ "MixinSkinManager", "MixinTextureManager", "MixinThreadDownloadImageDataV2", - "MixinThreadDownloadImageDataV3", - "MixinTileEntitySkull" + "MixinThreadDownloadImageDataV3" ], "refmap": "mixins.customskinloader.refmap.json", "plugin": "customskinloader.fabric.MixinConfigPlugin", diff --git a/Fabric/source/customskinloader/fabric/MixinConfigPlugin.java b/Fabric/source/customskinloader/fabric/MixinConfigPlugin.java index 257344c..c3bf37f 100644 --- a/Fabric/source/customskinloader/fabric/MixinConfigPlugin.java +++ b/Fabric/source/customskinloader/fabric/MixinConfigPlugin.java @@ -58,8 +58,6 @@ public class MixinConfigPlugin implements IMixinConfigPlugin { result = (this.world_version >= 2205 && this.world_version <= 2722) && ((this.protocol_version >= 554 && this.protocol_version <= 754) || (this.protocol_version >= 801 && this.protocol_version <= 803) || (this.protocol_version >= 0x40000001 && this.protocol_version <= 0x40000022)); // 19w38a ~ 1.17-rc1 } else if (mixinClassName.endsWith(".MixinLayerCape") || mixinClassName.endsWith(".MixinRenderPlayer")) { result = this.world_version >= 2210 && this.protocol_version >= 558; // 19w41a+ - } else if (mixinClassName.endsWith(".MixinTileEntitySkull")) { - result = this.world_version <= 2715 && (this.protocol_version <= 803 || (this.protocol_version >= 0x40000001 && this.protocol_version <= 0x4000001C)); // 21w20a- } else if (mixinClassName.endsWith(".MixinThreadDownloadImageDataV3")) { result = this.world_version >= 2723 && ((this.protocol_version >= 755 && this.protocol_version < 801) || (this.protocol_version > 803 && this.protocol_version < 0x40000001) || this.protocol_version >= 0x40000023); // 1.17-rc2+ } diff --git a/Forge/Active/Forge.tsrg b/Forge/Active/Forge.tsrg index 1bfc5b9..b94034a 100644 --- a/Forge/Active/Forge.tsrg +++ b/Forge/Active/Forge.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager net/minecraft/client/resources/SkinMa loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V m_118817_ net/minecraft/client/resources/SkinManager$SkinAvailableCallback net/minecraft/client/resources/SkinManager$SkinTextureCallback skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V m_118856_ -net/minecraft/tileentity/TileEntitySkull net/minecraft/world/level/block/entity/SkullBlockEntity net/minecraft/util/ResourceLocation net/minecraft/resources/ResourceLocation net/minecraft/util/StringUtils net/minecraft/util/StringUtil stripControlCodes (Ljava/lang/String;)Ljava/lang/String; m_14406_ diff --git a/Forge/Active/resource/transformers.js b/Forge/Active/resource/transformers.js index 075c8f5..0ca9d3e 100644 --- a/Forge/Active/resource/transformers.js +++ b/Forge/Active/resource/transformers.js @@ -31,7 +31,7 @@ function initializeCoreMod() { 'SkinManagerTransformer': { 'target': { 'type': 'CLASS', - 'name': 'net.minecraft.client.resources.SkinManager' + 'name': 'net/minecraft/client/resources/SkinManager' }, 'transformer': function (cn) { cn.fields.removeIf(function (fn) { diff --git a/Forge/Legacy/build.properties b/Forge/Legacy/build.properties index 13e8efa..b2c5f18 100644 --- a/Forge/Legacy/build.properties +++ b/Forge/Legacy/build.properties @@ -1,6 +1,6 @@ minecraft_version=1.12.2 minecraft_full_versions=1.8,1.8.8,1.8.9,1.9,1.9.4,1.10,1.10.2,1.11,1.11.2,1.12,1.12.1,1.12.2,1.13.2,1.14.2,1.14.3,1.14.4,1.15,1.15.1,1.15.2,1.16.1,1.16.2,1.16.3,1.16.4,1.16.5 -java_full_versions=8,9,10,11,12,13,14,15,16,17 +java_full_versions=8,9,10,11,12,13,14,15,16,17,18 #forge gradle needs forge version forge_mc_version=1.12.2 forge_version=14.23.5.2768 diff --git a/Forge/Legacy/resource/transformers.js b/Forge/Legacy/resource/transformers.js index 994905b..464d026 100644 --- a/Forge/Legacy/resource/transformers.js +++ b/Forge/Legacy/resource/transformers.js @@ -43,7 +43,7 @@ function initializeCoreMod() { 'SkinManagerTransformer': { 'target': { 'type': 'CLASS', - 'name': 'net.minecraft.client.resources.SkinManager' + 'name': 'net/minecraft/client/resources/SkinManager' }, 'transformer': function (cn) { cn.fields.removeIf(function (fn) { @@ -123,29 +123,6 @@ function initializeCoreMod() { return cn; } }, - 'TileEntitySkullTransformer': { - 'target': { - 'type': 'CLASS', - 'names': function (target) { - return ['net/minecraft/tileentity/TileEntitySkull', 'net/minecraft/tileentity/SkullTileEntity']; - } - }, - 'transformer': function (cn) { - cn.methods.forEach(function (mn) { - if (checkName(mn.name, "func_174884_b") && mn.desc.equals("(Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile;")) { - var first = mn.instructions.getFirst(); - var label = new LabelNode(); - mn.instructions.insertBefore(first, new FieldInsnNode(Opcodes.GETSTATIC, "customskinloader/CustomSkinLoader", "config", "Lcustomskinloader/config/Config;")); - mn.instructions.insertBefore(first, new FieldInsnNode(Opcodes.GETFIELD, "customskinloader/config/Config", "forceFillSkullNBT", "Z")); - mn.instructions.insertBefore(first, new JumpInsnNode(Opcodes.IFNE, label)); - mn.instructions.insertBefore(first, new VarInsnNode(Opcodes.ALOAD, 0)); - mn.instructions.insertBefore(first, new InsnNode(Opcodes.ARETURN)); - mn.instructions.insertBefore(first, label); - } - }); - return cn; - } - }, // For 1.13+ 'AbstractTextureTransformer': { diff --git a/Forge/Legacy/source/customskinloader/forge/loader/LaunchWrapper.java b/Forge/Legacy/source/customskinloader/forge/loader/LaunchWrapper.java index 4ebd0e1..4c96b3e 100644 --- a/Forge/Legacy/source/customskinloader/forge/loader/LaunchWrapper.java +++ b/Forge/Legacy/source/customskinloader/forge/loader/LaunchWrapper.java @@ -7,7 +7,6 @@ import customskinloader.forge.transformer.FakeInterfacesTransformer; import customskinloader.forge.transformer.PlayerTabTransformer; import customskinloader.forge.transformer.SkinManagerTransformer; import customskinloader.forge.transformer.SpectatorMenuTransformer; -import customskinloader.forge.transformer.TileEntitySkullTransformer; import net.minecraft.launchwrapper.IClassTransformer; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; @@ -30,8 +29,7 @@ public class LaunchWrapper implements IClassTransformer { new SkinManagerTransformer.LoadProfileTexturesTransformer(), new SkinManagerTransformer.LoadSkinFromCacheTransformer(), new PlayerTabTransformer.ScoreObjectiveTransformer(), - new SpectatorMenuTransformer.PlayerMenuObjectTransformer(), - new TileEntitySkullTransformer.UpdateGameProfileTransformer() + new SpectatorMenuTransformer.PlayerMenuObjectTransformer() }; private TransformerManager transformerManager = new TransformerManager(CLASS_TRANSFORMERS, TRANFORMERS); diff --git a/Forge/Legacy/source/customskinloader/forge/transformer/TileEntitySkullTransformer.java b/Forge/Legacy/source/customskinloader/forge/transformer/TileEntitySkullTransformer.java deleted file mode 100644 index 1b74072..0000000 --- a/Forge/Legacy/source/customskinloader/forge/transformer/TileEntitySkullTransformer.java +++ /dev/null @@ -1,38 +0,0 @@ -package customskinloader.forge.transformer; - -import customskinloader.forge.TransformerManager; -import org.objectweb.asm.Opcodes; -import org.objectweb.asm.tree.ClassNode; -import org.objectweb.asm.tree.FieldInsnNode; -import org.objectweb.asm.tree.FrameNode; -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.MethodNode; -import org.objectweb.asm.tree.VarInsnNode; - -public class TileEntitySkullTransformer { - @TransformerManager.TransformTarget( - className = "net.minecraft.tileentity.TileEntitySkull", - methodNameSrg = "func_174884_b", - methodNames = {"updateGameprofile", "updateGameProfile"}, - desc = "(Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile;" - ) - public static class UpdateGameProfileTransformer implements TransformerManager.IMethodTransformer { - @Override - public MethodNode transform(ClassNode cn, MethodNode mn) { - InsnList il = new InsnList(); - LabelNode ln = new LabelNode(); - il.add(new FieldInsnNode(Opcodes.GETSTATIC, "customskinloader/CustomSkinLoader", "config", "Lcustomskinloader/config/Config;")); - il.add(new FieldInsnNode(Opcodes.GETFIELD, "customskinloader/config/Config", "forceFillSkullNBT", "Z")); - il.add(new JumpInsnNode(Opcodes.IFNE, ln)); - il.add(new VarInsnNode(Opcodes.ALOAD, 0)); - il.add(new InsnNode(Opcodes.ARETURN)); - il.add(ln); - il.add(new FrameNode(Opcodes.F_SAME, 0, null, 0, null)); - mn.instructions.insert(il); - return mn; - } - } -} diff --git a/Vanilla/1.12.2/1.12.2.tsrg b/Vanilla/1.12.2/1.12.2.tsrg index aa09d37..11d2145 100644 --- a/Vanilla/1.12.2/1.12.2.tsrg +++ b/Vanilla/1.12.2/1.12.2.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager cex loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V a net/minecraft/client/resources/SkinManager$SkinAvailableCallback cex$a skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V a -net/minecraft/tileentity/TileEntitySkull awd net/minecraft/util/ResourceLocation nf net/minecraft/util/StringUtils rp stripControlCodes (Ljava/lang/String;)Ljava/lang/String; a diff --git a/Vanilla/1.12.2/mixin.tsrg b/Vanilla/1.12.2/mixin.tsrg index c2ffab0..2c9b57c 100644 --- a/Vanilla/1.12.2/mixin.tsrg +++ b/Vanilla/1.12.2/mixin.tsrg @@ -32,6 +32,4 @@ net/minecraft/client/resources/SkinManager cex net/minecraft/client/resources/SkinManager$SkinAvailableCallback cex$a net/minecraft/scoreboard/ScoreObjective bhg net/minecraft/scoreboard/Scoreboard bhk -net/minecraft/tileentity/TileEntitySkull awd - updateGameProfile (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile; b net/minecraft/util/ResourceLocation nf diff --git a/Vanilla/1.12.2/resource/mixins.customskinloader.json b/Vanilla/1.12.2/resource/mixins.customskinloader.json index 3c2ff4d..c04008c 100644 --- a/Vanilla/1.12.2/resource/mixins.customskinloader.json +++ b/Vanilla/1.12.2/resource/mixins.customskinloader.json @@ -8,8 +8,7 @@ "MixinPlayerMenuObject", "MixinSkinManager", "MixinTextureManager", - "MixinThreadDownloadImageDataV1", - "MixinTileEntitySkull" + "MixinThreadDownloadImageDataV1" ], "refmap": "mixins.customskinloader.refmap.json", "injectors": { diff --git a/Vanilla/1.16.5/1.16.5.tsrg b/Vanilla/1.16.5/1.16.5.tsrg index eaa6836..b70abae 100644 --- a/Vanilla/1.16.5/1.16.5.tsrg +++ b/Vanilla/1.16.5/1.16.5.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager eks loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V a net/minecraft/client/resources/SkinManager$SkinAvailableCallback eks$a skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V onSkinTextureAvailable -net/minecraft/tileentity/TileEntitySkull cdg net/minecraft/util/ResourceLocation vk net/minecraft/util/StringUtils aft stripControlCodes (Ljava/lang/String;)Ljava/lang/String; a diff --git a/Vanilla/1.16.5/mixin.tsrg b/Vanilla/1.16.5/mixin.tsrg index 47c3d02..d4182d5 100644 --- a/Vanilla/1.16.5/mixin.tsrg +++ b/Vanilla/1.16.5/mixin.tsrg @@ -32,6 +32,4 @@ net/minecraft/client/resources/SkinManager eks net/minecraft/client/resources/SkinManager$SkinAvailableCallback eks$a net/minecraft/scoreboard/ScoreObjective ddk net/minecraft/scoreboard/Scoreboard ddn -net/minecraft/tileentity/TileEntitySkull cdg - updateGameProfile (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile; b net/minecraft/util/ResourceLocation vk diff --git a/Vanilla/1.16.5/resource/mixins.customskinloader.json b/Vanilla/1.16.5/resource/mixins.customskinloader.json index 0b1fad1..616ce5c 100644 --- a/Vanilla/1.16.5/resource/mixins.customskinloader.json +++ b/Vanilla/1.16.5/resource/mixins.customskinloader.json @@ -9,8 +9,7 @@ "MixinRenderPlayer", "MixinSkinManager", "MixinTextureManager", - "MixinThreadDownloadImageDataV2", - "MixinTileEntitySkull" + "MixinThreadDownloadImageDataV2" ], "refmap": "mixins.customskinloader.refmap.json", "injectors": { diff --git a/Vanilla/1.17.1/1.17.1.tsrg b/Vanilla/1.17.1/1.17.1.tsrg index 9cb8c97..99178b6 100644 --- a/Vanilla/1.17.1/1.17.1.tsrg +++ b/Vanilla/1.17.1/1.17.1.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager eyc loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V a net/minecraft/client/resources/SkinManager$SkinAvailableCallback eyc$a skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V onSkinTextureAvailable -net/minecraft/tileentity/TileEntitySkull cjr net/minecraft/util/ResourceLocation ww net/minecraft/util/StringUtils ahj stripControlCodes (Ljava/lang/String;)Ljava/lang/String; a diff --git a/Vanilla/1.17.1/mixin.tsrg b/Vanilla/1.17.1/mixin.tsrg index 2c2933c..43757d4 100644 --- a/Vanilla/1.17.1/mixin.tsrg +++ b/Vanilla/1.17.1/mixin.tsrg @@ -32,6 +32,4 @@ net/minecraft/client/resources/SkinManager eyc net/minecraft/client/resources/SkinManager$SkinAvailableCallback eyc$a net/minecraft/scoreboard/ScoreObjective dnv net/minecraft/scoreboard/Scoreboard dny -net/minecraft/tileentity/TileEntitySkull cjr - updateGameProfile (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile; func_174884_b net/minecraft/util/ResourceLocation ww diff --git a/Vanilla/1.18.2/1.18.2.tsrg b/Vanilla/1.18.2/1.18.2.tsrg index 3dc01dc..669c15e 100644 --- a/Vanilla/1.18.2/1.18.2.tsrg +++ b/Vanilla/1.18.2/1.18.2.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager fbo loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V a net/minecraft/client/resources/SkinManager$SkinAvailableCallback fbo$a skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V onSkinTextureAvailable -net/minecraft/tileentity/TileEntitySkull cns net/minecraft/util/ResourceLocation yt net/minecraft/util/StringUtils aju stripControlCodes (Ljava/lang/String;)Ljava/lang/String; a diff --git a/Vanilla/1.18.2/mixin.tsrg b/Vanilla/1.18.2/mixin.tsrg index c745126..ad428ff 100644 --- a/Vanilla/1.18.2/mixin.tsrg +++ b/Vanilla/1.18.2/mixin.tsrg @@ -32,6 +32,4 @@ net/minecraft/client/resources/SkinManager fbo net/minecraft/client/resources/SkinManager$SkinAvailableCallback fbo$a net/minecraft/scoreboard/ScoreObjective dqj net/minecraft/scoreboard/Scoreboard dqm -net/minecraft/tileentity/TileEntitySkull cns - updateGameProfile (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile; func_174884_b net/minecraft/util/ResourceLocation yt diff --git a/Vanilla/1.8.9/1.8.9.tsrg b/Vanilla/1.8.9/1.8.9.tsrg index d86d69a..3237a19 100644 --- a/Vanilla/1.8.9/1.8.9.tsrg +++ b/Vanilla/1.8.9/1.8.9.tsrg @@ -53,7 +53,6 @@ net/minecraft/client/resources/SkinManager bnp loadProfileTextures (Lcom/mojang/authlib/GameProfile;Lnet/minecraft/client/resources/SkinManager$SkinAvailableCallback;Z)V a net/minecraft/client/resources/SkinManager$SkinAvailableCallback bnp$a skinAvailable (Lcom/mojang/authlib/minecraft/MinecraftProfileTexture$Type;Lnet/minecraft/util/ResourceLocation;Lcom/mojang/authlib/minecraft/MinecraftProfileTexture;)V a -net/minecraft/tileentity/TileEntitySkull alo net/minecraft/util/ResourceLocation jy net/minecraft/util/StringUtils nx stripControlCodes (Ljava/lang/String;)Ljava/lang/String; a diff --git a/Vanilla/1.8.9/mixin.tsrg b/Vanilla/1.8.9/mixin.tsrg index 9a60393..70e78fd 100644 --- a/Vanilla/1.8.9/mixin.tsrg +++ b/Vanilla/1.8.9/mixin.tsrg @@ -32,6 +32,4 @@ net/minecraft/client/resources/SkinManager bnp net/minecraft/client/resources/SkinManager$SkinAvailableCallback bnp$a net/minecraft/scoreboard/ScoreObjective auk net/minecraft/scoreboard/Scoreboard auo -net/minecraft/tileentity/TileEntitySkull alo - updateGameProfile (Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile; b net/minecraft/util/ResourceLocation jy diff --git a/Vanilla/1.8.9/resource/mixins.customskinloader.json b/Vanilla/1.8.9/resource/mixins.customskinloader.json index 3c2ff4d..c04008c 100644 --- a/Vanilla/1.8.9/resource/mixins.customskinloader.json +++ b/Vanilla/1.8.9/resource/mixins.customskinloader.json @@ -8,8 +8,7 @@ "MixinPlayerMenuObject", "MixinSkinManager", "MixinTextureManager", - "MixinThreadDownloadImageDataV1", - "MixinTileEntitySkull" + "MixinThreadDownloadImageDataV1" ], "refmap": "mixins.customskinloader.refmap.json", "injectors": { diff --git a/Vanilla/Common/source/customskinloader/mixin/MixinTileEntitySkull.java b/Vanilla/Common/source/customskinloader/mixin/MixinTileEntitySkull.java deleted file mode 100644 index 9ad6624..0000000 --- a/Vanilla/Common/source/customskinloader/mixin/MixinTileEntitySkull.java +++ /dev/null @@ -1,24 +0,0 @@ -package customskinloader.mixin; - -import com.mojang.authlib.GameProfile; -import customskinloader.CustomSkinLoader; -import net.minecraft.tileentity.TileEntitySkull; -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; - -/** Fix https://bugs.mojang.com/browse/MC-65587 */ -@Mixin(TileEntitySkull.class) -public abstract class MixinTileEntitySkull { - @Inject( - method = "Lnet/minecraft/tileentity/TileEntitySkull;updateGameProfile(Lcom/mojang/authlib/GameProfile;)Lcom/mojang/authlib/GameProfile;", - at = @At("HEAD"), - cancellable = true - ) - private static void inject_updateGameProfile(GameProfile input, CallbackInfoReturnable callbackInfoReturnable) { - if (!CustomSkinLoader.config.forceFillSkullNBT) { - callbackInfoReturnable.setReturnValue(input); - } - } -} diff --git a/build.properties b/build.properties index 8cc6edb..514cfb9 100644 --- a/build.properties +++ b/build.properties @@ -1,6 +1,6 @@ name=CustomSkinLoader group=customskinloader -version=14.13 +version=14.14 dev_version= #RELEASE: snapshot=0 -snapshot=0 +snapshot=1