mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-20 07:39:39 +00:00
Enhanced default skin loaders. (#157)
* Enhance ICustomSkinLoaderPlugin. * Support auto update config file per snapshot. Fix crash with forge 1.14.2 ~ 1.15.2. * ElyByAPI should check root now. * Remove unnecessary packages, add some deprecated loaders. * Reformat imports. * Move forge stuffs to another commit. * Fix config updating incorrectly.
This commit is contained in:
1 parent
c84f506af1
commit
6c9494970f
17 files changed
+286
-218
No files matched your search
@@ -3,17 +3,33 @@ package customskinloader.loader.jsonapi;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import customskinloader.CustomSkinLoader;
|
||||
import customskinloader.config.SkinSiteProfile;
|
||||
import customskinloader.loader.JsonAPILoader.IJsonAPI;
|
||||
import customskinloader.loader.JsonAPILoader;
|
||||
import customskinloader.profile.ModelManager0;
|
||||
import customskinloader.profile.ModelManager0.Model;
|
||||
import customskinloader.profile.UserProfile;
|
||||
import customskinloader.utils.HttpTextureUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public abstract class CustomSkinAPI implements JsonAPILoader.IJsonAPI {
|
||||
|
||||
public static class LittleSkin extends CustomSkinAPI {
|
||||
@Override public String getLoaderName() { return "LittleSkin"; }
|
||||
@Override public String getRoot() { return "https://littlesk.in/csl/"; }
|
||||
}
|
||||
|
||||
public static class BlessingSkin extends CustomSkinAPI {
|
||||
@Override public String getLoaderName() { return "BlessingSkin"; }
|
||||
@Override public String getRoot() { return "http://skin.prinzeugen.net/"; }
|
||||
}
|
||||
|
||||
/* OneSkin has been removed temporarily
|
||||
public static class OneSkin extends CustomSkinAPI {
|
||||
@Override public String getLoaderName() { return "OneSkin"; }
|
||||
@Override public String getRoot() { return "http://fleey.cn/skin/skin_user/skin_json.php/"; }
|
||||
}
|
||||
*/
|
||||
|
||||
public class CustomSkinAPI implements IJsonAPI {
|
||||
private static final String TEXTURES="textures/";
|
||||
private static final String SUFFIX=".json";
|
||||
|
||||
@@ -53,7 +69,7 @@ public class CustomSkinAPI implements IJsonAPI {
|
||||
|
||||
boolean hasSkin=false;
|
||||
for(String model:textures.keySet()){
|
||||
Model enumModel=ModelManager0.getEnumModel(model);
|
||||
ModelManager0.Model enumModel=ModelManager0.getEnumModel(model);
|
||||
if(enumModel==null||StringUtils.isEmpty(textures.get(model)))
|
||||
continue;
|
||||
if(ModelManager0.isSkin(enumModel))
|
||||
@@ -69,7 +85,7 @@ public class CustomSkinAPI implements IJsonAPI {
|
||||
|
||||
return p;
|
||||
}
|
||||
private class CustomSkinAPIProfile{
|
||||
private static class CustomSkinAPIProfile{
|
||||
public String username;
|
||||
public LinkedHashMap<String,String> textures;
|
||||
|
||||
|
||||
Reference in new issue
Block a user