Add Profile.json for vanilla edition

Remove CustomSkinAPIPlusPrivacy
Fix typo in ReadMe
Update mcp map
This commit is contained in:
Alexander Xia committed 2018-08-11 07:34:13 +08:00
1 parent d789119c8f
commit ca8bd4e83d
7 files changed
+40 -30

No files matched your search

+1 -1
View File
@@ -3,5 +3,5 @@ minecraft_full_versions=1.13
#forge gradle needs forge version
forge_mc_version=1.12.2
forge_version=14.23.3.2655
mappings_version=snapshot_20180505
mappings_version=snapshot_20180810
srg_notch_map=1.13.srg
+24
View File
@@ -0,0 +1,24 @@
{
"id": "${mcVersion}-CSL-${modFullVersion}",
"inheritsFrom": "${mcVersion}",
"jar": "${mcVersion}",
"releaseTime": "2013-01-02T21:10:00+08:00",
"time": "2013-01-02T21:10:00+08:00",
"type": "release",
"arguments": {
"game": [
"--tweakClass",
"customskinloader.tweaker.Tweaker"
]
},
"mainClass": "net.minecraft.launchwrapper.Launch",
"libraries": [
{
"name": "customskinloader:CustomSkinLoader_${mcVersion}:${modFullVersion}",
"url": "https://resource.littleskin.cn/"
},
{
"name": "net.minecraft:launchwrapper:1.12"
}
]
}
@@ -1,14 +1,11 @@
package customskinloader.config;
import customskinloader.loader.jsonapi.CustomSkinAPIPlus.CustomSkinAPIPlusPrivacy;
public class SkinSiteProfile {
public String name;
public String type;
public String userAgent;
public String root;
public CustomSkinAPIPlusPrivacy privacy;
public Boolean checkPNG;//Not suitable for local skin
public String skin;
@@ -34,7 +31,6 @@ public class SkinSiteProfile {
ssp.name=name;
ssp.type="CustomSkinAPIPlus";
ssp.root=root;
ssp.privacy=new CustomSkinAPIPlusPrivacy();
return ssp;
}
public static SkinSiteProfile createUniSkinAPI(String name,String root){
@@ -42,9 +42,7 @@ public class CustomSkinAPIPlus implements IJsonAPI {
@Override
public String getPayload(SkinSiteProfile ssp) {
if(ssp.privacy==null)
ssp.privacy=new CustomSkinAPIPlusPrivacy();
return new Gson().toJson(new CustomSkinAPIPlusPayload(ssp.privacy));
return new Gson().toJson(new CustomSkinAPIPlusPayload());
}
@Override
@@ -58,25 +56,15 @@ public class CustomSkinAPIPlus implements IJsonAPI {
}
public static class CustomSkinAPIPlusPayload{
public String gameVersion;//minecraft version
public String modVersion;//mod version
public String serverAddress;//ip:port
public String clientID;//Minecraft Client ID
public CustomSkinAPIPlusPayload(CustomSkinAPIPlusPrivacy privacy){
if(privacy.gameVersion)
gameVersion=MinecraftUtil.getMinecraftMainVersion();
if(privacy.modVersion)
modVersion=CustomSkinLoader.CustomSkinLoader_VERSION;
if(privacy.serverAddress)
serverAddress=MinecraftUtil.isLanServer()?null:MinecraftUtil.getStandardServerAddress();
if(privacy.clientID)
clientID=CustomSkinAPIPlus.clientID;
String gameVersion;//minecraft version
String modVersion;//mod version
String serverAddress;//ip:port
String clientID;//Minecraft Client ID
CustomSkinAPIPlusPayload(){
gameVersion = MinecraftUtil.getMinecraftMainVersion();
modVersion = CustomSkinLoader.CustomSkinLoader_VERSION;
serverAddress = MinecraftUtil.isLanServer() ? null : MinecraftUtil.getStandardServerAddress();
clientID = CustomSkinAPIPlus.clientID;
}
}
public static class CustomSkinAPIPlusPrivacy{
public boolean gameVersion=true;
public boolean modVersion=true;
public boolean serverAddress=true;
public boolean clientID=true;
}
}
@@ -7,6 +7,7 @@ import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.minecraft.client.Minecraft;
import org.apache.commons.lang3.StringUtils;
import com.mojang.authlib.GameProfile;
@@ -21,7 +22,7 @@ import net.minecraft.client.renderer.texture.TextureManager;
*/
public class MinecraftUtil {
public static File getMinecraftDataDir(){
return net.minecraft.client.Minecraft.getMinecraft().mcDataDir;
return Minecraft.getMinecraft().gameDir;
}
public static MinecraftSessionService getSessionService(){
return net.minecraft.client.Minecraft.getMinecraft().getSessionService();
+2 -1
View File
@@ -15,7 +15,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
ext.MINECRAFT_VERSION = "1.12.2"
ext.FORGE_VERSION = "14.23.3.2655"
ext.MAPPING_VERSION = "snapshot_20180505"
ext.MAPPING_VERSION = "snapshot_20180810"
ext.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"
ext.snapshot = !(rootProject.ext.config.snapshot == "" || rootProject.ext.config.snapshot == "0" || rootProject.ext.config.snapshot == 0)
@@ -46,6 +46,7 @@ sourceSets {
resources {
//Common
srcDir '../Common/resource'
exclude 'Profile.json'
//Forge
srcDir 'resource'
}
+1 -1
View File
@@ -14,7 +14,7 @@ Supported Skin Load APIs:
- [CustomSkinAPI](https://github.com/xfl03/CustomSkinLoaderAPI/tree/master/CustomSkinAPI)
- CustomSkinAPIPlus (Test Only)
- [UniSkinAPI](https://github.com/RecursiveG/UniSkinServer/tree/master/doc)
- [ElfByAPI](http://docs.ely.by/api.html)
- [ElyByAPI](http://docs.ely.by/api.html)
- Legacy
You can use this feature to customize your skin load list so as to load your skins from any skin server you want.