├── CustomSkinAPI ├── CustomSkinAPI-zh_CN.md └── LICENSE ├── CustomSkinModFix └── 1.7.10-forge1558 │ ├── build.gradle │ └── src │ └── main │ ├── java │ └── customskinloader │ │ └── modfix │ │ ├── ModFix.java │ │ ├── ModFixLoader.java │ │ ├── ModFixTransformer.java │ │ └── headcrumbs │ │ ├── HeadCrumbsFix.java │ │ └── HeadCrumbsTransformer.java │ └── resources │ └── mcmod.info ├── ExtraList └── ExtraList-zh_CN.md └── README.md /CustomSkinAPI/CustomSkinAPI-zh_CN.md: -------------------------------------------------------------------------------- 1 | # CustomSkinAPI 2 | #### Revision 2 3 | ## API 意义 4 | 5 | - 可有效减少网络请求 6 | - 可有效保证皮肤缓存的有效性 7 | - 更方便改变皮肤模型 8 | 9 | - 更可使皮肤加载流程更加容易理解 10 | 11 | ## API 应用 12 | 13 | 您可以在任何项目中实现基于这一 API 的皮肤加载。 14 | 15 | CustomSkinLoader 已经在 13.1 版本支持CustomSkinAPI R1 16 | CustomSkinLoader 已经在 14.5 版本支持CustomSkinAPI R2 17 | 18 | ## API 定义 19 | 20 | ### API 请求规范 21 | 22 | 不带任何参数的 GET 请求 23 | 24 | ### API 响应规范 25 | 可使用 GZIP 与 重定向 26 | 27 | 尽可能响应 `If-Modified-Since` 28 | 尽可能返回正确有效的 `Content-Length` 头与 `Last-Modified` 头,其他 HTTP 头均为可选。 29 | 30 | 可响应`Cache-Control`或`Expires`头(前者优先),CustomSkinLoader将以此来确定内容有效期。 31 | 32 | ### 根地址 33 | 34 | 根地址定义了可以响应 CustomSkinAPI 的 URL。 35 | 36 | 根地址可以是一个域名,例如 `http://localhost/` ,也可以带上端口 例如 `http://localhost:8080/`。也可以带有子文件夹,例如 `http://localhost/csl/`。 37 | 38 | **请注意** 根地址必须以 `/` 结尾 。 39 | 40 | 以下内容中根地址将使用 `{ROOT}` 代替。 41 | 42 | ### 玩家信息 43 | 44 | 请尽量生成容易阅读的的排版过的 JSON,压缩过的 JSON 也可以接受 45 | 46 | #### JSON 格式 47 | ``` 48 | { 49 | "username": "{字符串,大小写正确的玩家名}", 50 | "textures": {材质字典} 51 | } 52 | ``` 53 | 以上是通常的JSON格式,也可以使用以下缩略写法,此时皮肤将会使用`default`模型: 54 | ``` 55 | { 56 | "username" : "{字符串,大小写正确的玩家名}", 57 | "skin" : "{皮肤的资源唯一标识符}", 58 | "cape" : "{披风的资源唯一标识符}", 59 | "elytra" : "{鞘翅的资源唯一标识符}" 60 | } 61 | ``` 62 | 63 | 项目重复时以`textures`中的为准。 64 | 所有的项目都是可选的,如果没有,可以直接不返回,也可以留空,也可以使用`null` 65 | 例如 `"cape" : ""` 或 `"cape" : null` 66 | 67 | #### 材质字典 68 | ``` 69 | { 70 | "{第一模型}" : "{资源唯一标识符}", 71 | "{第二模型}" : "{资源唯一标识符}" 72 | } 73 | ``` 74 | ##### 可用模型 75 | - `(,1.7.10]` `default` `cape` 76 | - `[1.8,1.8.9]` `default` `slim` `cape` 77 | - `[1.9,)` `default` `slim` `cape` `elytra` 78 | ##### 皮肤模型 79 | 材质字典中的皮肤的顺序应与用户的偏好顺序一致。 80 | 在支持 `slim`/`default` 双模型的客户端中,将会根据材质字典的顺序决定加载的皮肤与模型。 81 | 在支持`default`单一模型的客户端中,将会直接寻找`default`模型对应的材质进行加载。 82 | 此时,如果只设定了`slim`模型,那么将采用`default`模型 + `slim`皮肤,**这会导致手臂渲染错误** 83 | 84 | #### JSON 范例 85 | 完整的用户信息 JSON 86 | ``` 87 | { 88 | "username" : "test", 89 | "textures" : { 90 | "default" : "6dc40bc8af6a48861b914d36dc1437446a977b644ab7f9c4942f79173d315b30", 91 | "slim" : "b2c4ef891f01c5a8e2dc8a832bc3a89c32b59ee3dadc1c4de6e357f997d2dbaf", 92 | "cape" : "aed8c3fc67aae4906b72fa74c27e15866c89752f0838f6b2a1c44bb4d59cec1e", 93 | "elytra" : "b6a865cc67aae4906b72fa74c27e15866c895f270838f6b2a1c44bb4d5954ca8" 94 | } 95 | } 96 | ``` 97 | 缩略写法: 98 | ``` 99 | { 100 | "username" : "test", 101 | "skin" : "b2c4ef891f01c5a8e2dc8a832bc3a89c32b59ee3dadc1c4de6e357f997d2dbaf", 102 | "cape" : "aed8c3fc67aae4906b72fa74c27e15866c89752f0838f6b2a1c44bb4d59cec1e", 103 | "elytra" : "b6a865cc67aae4906b72fa74c27e15866c895f270838f6b2a1c44bb4d5954ca8" 104 | } 105 | ``` 106 | ## API 接口 107 | ### 获取玩家信息 108 | 请求 URL:`{ROOT}/{USERNAME}.json` 109 | 110 | 其中 `{USERNAME}` 大小写可随意。 111 | 112 | 响应: 113 | - 200 找到玩家,返回玩家信息 114 | - 404 未找到玩家 115 | 116 | ### 获得资源文件 117 | 请求URL: `{ROOT}/textures/{资源唯一标识符}` 118 | 119 | 响应: 120 | - 200,找到资源并返回资源 121 | - 404,资源未找到 122 | 123 | `{资源唯一标识符}` 可以自定义为任意的唯一字符串,推荐使用SHA-256。 124 | -------------------------------------------------------------------------------- /CustomSkinAPI/LICENSE: -------------------------------------------------------------------------------- 1 | CC0 1.0 Universal 2 | 3 | Statement of Purpose 4 | 5 | The laws of most jurisdictions throughout the world automatically confer 6 | exclusive Copyright and Related Rights (defined below) upon the creator and 7 | subsequent owner(s) (each and all, an "owner") of an original work of 8 | authorship and/or a database (each, a "Work"). 9 | 10 | Certain owners wish to permanently relinquish those rights to a Work for the 11 | purpose of contributing to a commons of creative, cultural and scientific 12 | works ("Commons") that the public can reliably and without fear of later 13 | claims of infringement build upon, modify, incorporate in other works, reuse 14 | and redistribute as freely as possible in any form whatsoever and for any 15 | purposes, including without limitation commercial purposes. These owners may 16 | contribute to the Commons to promote the ideal of a free culture and the 17 | further production of creative, cultural and scientific works, or to gain 18 | reputation or greater distribution for their Work in part through the use and 19 | efforts of others. 20 | 21 | For these and/or other purposes and motivations, and without any expectation 22 | of additional consideration or compensation, the person associating CC0 with a 23 | Work (the "Affirmer"), to the extent that he or she is an owner of Copyright 24 | and Related Rights in the Work, voluntarily elects to apply CC0 to the Work 25 | and publicly distribute the Work under its terms, with knowledge of his or her 26 | Copyright and Related Rights in the Work and the meaning and intended legal 27 | effect of CC0 on those rights. 28 | 29 | 1. Copyright and Related Rights. A Work made available under CC0 may be 30 | protected by copyright and related or neighboring rights ("Copyright and 31 | Related Rights"). Copyright and Related Rights include, but are not limited 32 | to, the following: 33 | 34 | i. the right to reproduce, adapt, distribute, perform, display, communicate, 35 | and translate a Work; 36 | 37 | ii. moral rights retained by the original author(s) and/or performer(s); 38 | 39 | iii. publicity and privacy rights pertaining to a person's image or likeness 40 | depicted in a Work; 41 | 42 | iv. rights protecting against unfair competition in regards to a Work, 43 | subject to the limitations in paragraph 4(a), below; 44 | 45 | v. rights protecting the extraction, dissemination, use and reuse of data in 46 | a Work; 47 | 48 | vi. database rights (such as those arising under Directive 96/9/EC of the 49 | European Parliament and of the Council of 11 March 1996 on the legal 50 | protection of databases, and under any national implementation thereof, 51 | including any amended or successor version of such directive); and 52 | 53 | vii. other similar, equivalent or corresponding rights throughout the world 54 | based on applicable law or treaty, and any national implementations thereof. 55 | 56 | 2. Waiver. To the greatest extent permitted by, but not in contravention of, 57 | applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and 58 | unconditionally waives, abandons, and surrenders all of Affirmer's Copyright 59 | and Related Rights and associated claims and causes of action, whether now 60 | known or unknown (including existing as well as future claims and causes of 61 | action), in the Work (i) in all territories worldwide, (ii) for the maximum 62 | duration provided by applicable law or treaty (including future time 63 | extensions), (iii) in any current or future medium and for any number of 64 | copies, and (iv) for any purpose whatsoever, including without limitation 65 | commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes 66 | the Waiver for the benefit of each member of the public at large and to the 67 | detriment of Affirmer's heirs and successors, fully intending that such Waiver 68 | shall not be subject to revocation, rescission, cancellation, termination, or 69 | any other legal or equitable action to disrupt the quiet enjoyment of the Work 70 | by the public as contemplated by Affirmer's express Statement of Purpose. 71 | 72 | 3. Public License Fallback. Should any part of the Waiver for any reason be 73 | judged legally invalid or ineffective under applicable law, then the Waiver 74 | shall be preserved to the maximum extent permitted taking into account 75 | Affirmer's express Statement of Purpose. In addition, to the extent the Waiver 76 | is so judged Affirmer hereby grants to each affected person a royalty-free, 77 | non transferable, non sublicensable, non exclusive, irrevocable and 78 | unconditional license to exercise Affirmer's Copyright and Related Rights in 79 | the Work (i) in all territories worldwide, (ii) for the maximum duration 80 | provided by applicable law or treaty (including future time extensions), (iii) 81 | in any current or future medium and for any number of copies, and (iv) for any 82 | purpose whatsoever, including without limitation commercial, advertising or 83 | promotional purposes (the "License"). The License shall be deemed effective as 84 | of the date CC0 was applied by Affirmer to the Work. Should any part of the 85 | License for any reason be judged legally invalid or ineffective under 86 | applicable law, such partial invalidity or ineffectiveness shall not 87 | invalidate the remainder of the License, and in such case Affirmer hereby 88 | affirms that he or she will not (i) exercise any of his or her remaining 89 | Copyright and Related Rights in the Work or (ii) assert any associated claims 90 | and causes of action with respect to the Work, in either case contrary to 91 | Affirmer's express Statement of Purpose. 92 | 93 | 4. Limitations and Disclaimers. 94 | 95 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 96 | surrendered, licensed or otherwise affected by this document. 97 | 98 | b. Affirmer offers the Work as-is and makes no representations or warranties 99 | of any kind concerning the Work, express, implied, statutory or otherwise, 100 | including without limitation warranties of title, merchantability, fitness 101 | for a particular purpose, non infringement, or the absence of latent or 102 | other defects, accuracy, or the present or absence of errors, whether or not 103 | discoverable, all to the greatest extent permissible under applicable law. 104 | 105 | c. Affirmer disclaims responsibility for clearing rights of other persons 106 | that may apply to the Work or any use thereof, including without limitation 107 | any person's Copyright and Related Rights in the Work. Further, Affirmer 108 | disclaims responsibility for obtaining any necessary consents, permissions 109 | or other rights required for any use of the Work. 110 | 111 | d. Affirmer understands and acknowledges that Creative Commons is not a 112 | party to this document and has no duty or obligation with respect to this 113 | CC0 or use of the Work. 114 | 115 | For more information, please see 116 | 117 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | /* 4 | mavenCentral() 5 | maven { 6 | name = "forge" 7 | url = "http://files.minecraftforge.net/maven" 8 | }*/ 9 | maven { 10 | name = "fmm" 11 | url = "http://forgemavenmirror.sinaapp.com/maven" 12 | } 13 | maven { 14 | name = "sonatype" 15 | url = "https://oss.sonatype.org/content/repositories/snapshots/" 16 | } 17 | } 18 | dependencies { 19 | classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' 20 | } 21 | } 22 | 23 | apply plugin: 'forge' 24 | 25 | version = "1.0.1" 26 | group= "customskinloader.modfix" // http://maven.apache.org/guides/mini/guide-naming-conventions.html 27 | archivesBaseName = "CustomSkinModFix_1.7.10" 28 | println minecraft.getMappings(); 29 | 30 | minecraft { 31 | version = "1.7.10-10.13.4.1558-1.7.10" 32 | runDir = "eclipse" 33 | mappings = "stable_12" 34 | } 35 | 36 | jar { 37 | manifest { 38 | attributes 'FMLCorePlugin': 'customskinloader.modfix.ModFixLoader' 39 | attributes 'FMLCorePluginContainsFMLMod': true 40 | } 41 | } 42 | 43 | dependencies { 44 | // you may put jars on which you depend on in ./libs 45 | // or you may define them like so.. 46 | //compile "some.group:artifact:version:classifier" 47 | //compile "some.group:artifact:version" 48 | 49 | // real examples 50 | //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env 51 | //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env 52 | 53 | // for more info... 54 | // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html 55 | // http://www.gradle.org/docs/current/userguide/dependency_management.html 56 | compile fileTree(dir: 'libs', include: '*.jar,*.zip') 57 | 58 | } 59 | 60 | processResources 61 | { 62 | // this will ensure that this task is redone when the versions change. 63 | inputs.property "version", project.version 64 | inputs.property "mcversion", project.minecraft.version 65 | 66 | // replace stuff in mcmod.info, nothing else 67 | from(sourceSets.main.resources.srcDirs) { 68 | include 'mcmod.info' 69 | 70 | // replace version and mcversion 71 | expand 'version':project.version, 'mcversion':project.minecraft.version 72 | } 73 | 74 | // copy everything else, thats not the mcmod.info 75 | from(sourceSets.main.resources.srcDirs) { 76 | exclude 'mcmod.info' 77 | } 78 | } 79 | task deobfJar(type: Jar, dependsOn: 'jar') { 80 | from "build/classes/main" 81 | classifier "dev" 82 | } 83 | task sourceJar(type: Jar, dependsOn: 'sourceMainJava') { 84 | from "build/sources/java" 85 | from "build/resources/main/java" 86 | classifier "sources" 87 | } 88 | artifacts { 89 | archives deobfJar 90 | archives sourceJar 91 | } 92 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/src/main/java/customskinloader/modfix/ModFix.java: -------------------------------------------------------------------------------- 1 | package customskinloader.modfix; 2 | 3 | import cpw.mods.fml.common.Mod; 4 | import cpw.mods.fml.relauncher.Side; 5 | import cpw.mods.fml.relauncher.SideOnly; 6 | 7 | @Mod(modid = "customskinmodfix") 8 | @SideOnly(Side.CLIENT) 9 | public class ModFix { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/src/main/java/customskinloader/modfix/ModFixLoader.java: -------------------------------------------------------------------------------- 1 | package customskinloader.modfix; 2 | 3 | import java.util.Map; 4 | 5 | import cpw.mods.fml.relauncher.IFMLLoadingPlugin; 6 | 7 | public class ModFixLoader implements IFMLLoadingPlugin { 8 | 9 | @Override 10 | public String[] getASMTransformerClass() { 11 | return new String[] {ModFixTransformer.class.getName()}; 12 | } 13 | 14 | @Override 15 | public String getModContainerClass() { 16 | return null; 17 | } 18 | 19 | @Override 20 | public String getSetupClass() { 21 | return null; 22 | } 23 | 24 | @Override 25 | public void injectData(Map data) { 26 | } 27 | 28 | @Override 29 | public String getAccessTransformerClass() { 30 | return null; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/src/main/java/customskinloader/modfix/ModFixTransformer.java: -------------------------------------------------------------------------------- 1 | package customskinloader.modfix; 2 | 3 | import java.util.ArrayList; 4 | import java.util.HashMap; 5 | import java.util.List; 6 | import java.util.Map; 7 | 8 | import org.objectweb.asm.ClassReader; 9 | import org.objectweb.asm.ClassWriter; 10 | import org.objectweb.asm.tree.ClassNode; 11 | import org.objectweb.asm.tree.MethodNode; 12 | 13 | import cpw.mods.fml.relauncher.FMLRelaunchLog; 14 | import customskinloader.modfix.headcrumbs.HeadCrumbsTransformer; 15 | import net.minecraft.launchwrapper.IClassTransformer; 16 | 17 | /* 18 | * Some code is from RecursiveG/UniSkinMod 19 | * Source: https://github.com/RecursiveG/UniSkinMod/blob/1.9.4/src/main/java/org/devinprogress/uniskinmod/coremod/BaseAsmTransformer.java 20 | * License: GPLv2 21 | * */ 22 | public class ModFixTransformer implements IClassTransformer { 23 | 24 | public interface IMethodTransformer { 25 | void transform(MethodNode mn); 26 | } 27 | 28 | private Map> map; 29 | public ModFixTransformer(){ 30 | FMLRelaunchLog.info("[ModFixTransformer] Loading"); 31 | map = new HashMap>(); 32 | //Register method tranformer 33 | hookMethod("ganymedes01.headcrumbs.network.packet.TextureSendPacket", 34 | "handleClientSide", 35 | "(Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;)V", 36 | new HeadCrumbsTransformer.handleClientSideTransformer()); 37 | } 38 | protected void hookMethod(String className, String methodName, String desc, IMethodTransformer targetTransformer) { 39 | FMLRelaunchLog.info("[ModFixTransformer] REGISTERED"); 40 | if (!map.containsKey(className)) 41 | map.put(className, new HashMap()); 42 | map.get(className).put(methodName+desc, targetTransformer); 43 | } 44 | 45 | @Override 46 | public byte[] transform(String className, String transformedName, byte[] bytes) { 47 | if (!map.containsKey(className)) return bytes; 48 | //FMLRelaunchLog.info("[ModFixTransformer] !!! "+className); 49 | Map transMap = map.get(className); 50 | ClassReader cr = new ClassReader(bytes); 51 | ClassNode cn = new ClassNode(); 52 | cr.accept(cn, 0); 53 | 54 | List ml = new ArrayList(); 55 | ml.addAll(cn.methods); 56 | for (MethodNode mn : ml) { 57 | String methodName = mn.name; 58 | String methodDesc = mn.desc; 59 | //FMLRelaunchLog.info("[ModFixTransformer] ! "+methodName+" "+methodDesc); 60 | if (transMap.containsKey(methodName + methodDesc)) { 61 | try { 62 | FMLRelaunchLog.info("[ModFixTransformer] Transforming method %s in class %s", methodName + methodDesc, className); 63 | transMap.get(methodName + methodDesc).transform(mn); 64 | FMLRelaunchLog.info("[ModFixTransformer] Successfully transformed method %s in class %s", methodName + methodDesc, className); 65 | } catch (Exception e) { 66 | FMLRelaunchLog.warning("[ModFixTransformer] An error happened when transforming method %s in class %s. The whole class was not modified.", methodName + methodDesc, className); 67 | e.printStackTrace(); 68 | return bytes; 69 | } 70 | } 71 | } 72 | 73 | ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES | ClassWriter.COMPUTE_MAXS); 74 | cn.accept(cw); 75 | return cw.toByteArray(); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/src/main/java/customskinloader/modfix/headcrumbs/HeadCrumbsFix.java: -------------------------------------------------------------------------------- 1 | package customskinloader.modfix.headcrumbs; 2 | 3 | import java.util.Map; 4 | import java.util.concurrent.TimeUnit; 5 | 6 | import com.google.common.cache.CacheBuilder; 7 | import com.google.common.cache.CacheLoader; 8 | import com.google.common.cache.LoadingCache; 9 | import com.mojang.authlib.GameProfile; 10 | import com.mojang.authlib.minecraft.MinecraftProfileTexture; 11 | import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; 12 | 13 | import customskinloader.CustomSkinLoader; 14 | 15 | import ganymedes01.headcrumbs.Headcrumbs; 16 | import ganymedes01.headcrumbs.utils.TextureUtils; 17 | import ganymedes01.headcrumbs.utils.helpers.EtFuturumHelper; 18 | 19 | import net.minecraft.client.Minecraft; 20 | import net.minecraft.client.resources.SkinManager; 21 | import net.minecraft.client.resources.SkinManager.SkinAvailableCallback; 22 | import net.minecraft.util.ResourceLocation; 23 | 24 | public class HeadCrumbsFix { 25 | private static final LoadingCache> skinCacheLoader; 26 | 27 | static{ 28 | skinCacheLoader = CacheBuilder.newBuilder().expireAfterAccess(15L, TimeUnit.SECONDS).>build(new CacheLoader>() 29 | { 30 | public Map load(GameProfile p_load_1_) throws Exception 31 | { 32 | return Minecraft.getMinecraft().getSessionService().getTextures(p_load_1_, false); 33 | } 34 | }); 35 | } 36 | 37 | //This method will be called only once when needs texture 38 | @SuppressWarnings("unchecked") 39 | public static void handleClientSide(GameProfile profile){ 40 | Map map=skinCacheLoader.getUnchecked(profile); 41 | if((map==null||map.isEmpty())&&profile.getName()!=null) 42 | map=CustomSkinLoader.loadProfile(profile); 43 | if(map==null||map.isEmpty()) 44 | return; 45 | SkinManager skinManager = Minecraft.getMinecraft().getSkinManager(); 46 | 47 | for (Type type : Type.values()) 48 | if (map.containsKey(type)) 49 | skinManager.loadSkin(map.get(type), type, getCallback(profile,type)); 50 | } 51 | public static SkinAvailableCallback getCallback(final GameProfile profile,Type type) { 52 | if (Headcrumbs.use18PlayerModel) 53 | return EtFuturumHelper.getSkinDownloadCallback(profile.getName()); 54 | else 55 | return new SkinAvailableCallback() { 56 | @Override 57 | public void onSkinAvailable(Type type, ResourceLocation texture) { 58 | TextureUtils.textures.get(type).put(profile.getName(), texture); 59 | } 60 | }; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/src/main/java/customskinloader/modfix/headcrumbs/HeadCrumbsTransformer.java: -------------------------------------------------------------------------------- 1 | package customskinloader.modfix.headcrumbs; 2 | 3 | import org.objectweb.asm.Opcodes; 4 | import org.objectweb.asm.tree.FieldInsnNode; 5 | import org.objectweb.asm.tree.InsnNode; 6 | import org.objectweb.asm.tree.MethodInsnNode; 7 | import org.objectweb.asm.tree.MethodNode; 8 | import org.objectweb.asm.tree.VarInsnNode; 9 | 10 | import customskinloader.modfix.ModFixTransformer; 11 | 12 | public class HeadCrumbsTransformer { 13 | 14 | /* 15 | className : ganymedes01.headcrumbs.network.packet.TextureSendPacket 16 | methodName : handleClientSide 17 | desc : (Lnet/minecraft/world/World;Lnet/minecraft/entity/player/EntityPlayer;)V 18 | */ 19 | public static class handleClientSideTransformer implements ModFixTransformer.IMethodTransformer{ 20 | @Override 21 | public void transform(MethodNode mn) { 22 | mn.instructions.clear(); 23 | mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0)); 24 | mn.instructions.add(new FieldInsnNode(Opcodes.GETFIELD, "ganymedes01/headcrumbs/network/packet/TextureSendPacket", "profile", "Lcom/mojang/authlib/GameProfile;")); 25 | mn.instructions.add(new MethodInsnNode(Opcodes.INVOKESTATIC, 26 | "customskinloader/modfix/headcrumbs/HeadCrumbsFix", "handleClientSide", 27 | "(Lcom/mojang/authlib/GameProfile;)V", false)); 28 | mn.instructions.add(new InsnNode(Opcodes.RETURN)); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /CustomSkinModFix/1.7.10-forge1558/src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "customskinmodfix", 4 | "name": "CustomSkinModFix", 5 | "description": "Mod fix for CustomSkinLoader.", 6 | "version": "${version}", 7 | "mcversion": "${mcversion}", 8 | "url": "http://www.mcbbs.net/thread-269807-1-1.html", 9 | "updateUrl": "", 10 | "authorList": ["xfl03"], 11 | "credits": "GPLv3", 12 | "logoFile": "", 13 | "screenshots": [], 14 | "dependencies": [] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /ExtraList/ExtraList-zh_CN.md: -------------------------------------------------------------------------------- 1 | # ExtraList 2 | 3 | ## 功能 4 | 方便用户将皮肤站加入CustomSkinLoader加载列表 5 | 将会在CustomSkinLoader 14.4中支持 6 | *原名ListAddition已被弃用* 7 | 8 | ## 要求 9 | - 为兼容下载器可更改文件名,只需保证文件为 `*.txt` 或 `*.json` 即可 10 | - 编码: UTF-8 11 | - 尽量直接点击即下载,不建议要求另存为/以文本方式直接打开 12 | - 皮肤站尽量附上教程(请自定义) 13 | 14 | ## 教程示例 15 | - 使用CustomSkinLoader 14.4及以上 16 | - 下载文件(附上下载链接) 17 | - 将文件放入 `.minecraft/CustomSkinLoader/ExtraList` 18 | - 启动Minecraft 19 | 20 | ## 文件格式 21 | 同 `CustomSkinLoader.json` loadlist中的格式 22 | 实例: `Example.json` 23 | ``` 24 | { 25 | "name":"Example", 26 | "type":"CustomSkinAPI", 27 | "root":"http://www.example.com/" 28 | } 29 | ``` 30 | 31 | ## 其他 32 | CustomSkinLoader会自动检测皮肤站是否重复,无需担心这一点。 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CustomSkinLoaderAPI 2 | 3 | ## CustomSkinAPI 4 | Json API used in [CustomSkinLoader](https://github.com/JLChnToZ/MCCustomSkinLoader) 5 | It will be supported after CSL 13.1 6 | LICENSE: CC 1.0 7 | https://github.com/xfl03/CustomSkinLoaderAPI/blob/master/CustomSkinAPI/CustomSkinAPI_zh-CN.md 8 | 9 | ## CustomSkinModFix 10 | Mod Fix for CustomSkinLoader. 11 | LICENSE: GPL v3 12 | 13 | ## ExtraList 14 | A function for Skin Server Owner to make it easier for user to add server into 'Load List'. 15 | LICENSE: CC 1.0 --------------------------------------------------------------------------------