mirror of
https://github.com/xfl03/MCCustomSkinLoader.git
synced 2026-11-22 03:52:15 +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,21 @@ package customskinloader.loader.jsonapi;
|
||||
import java.util.List;
|
||||
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.UserProfile;
|
||||
import customskinloader.profile.ModelManager0.Model;
|
||||
import customskinloader.utils.HttpTextureUtil;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
public abstract class UniSkinAPI implements JsonAPILoader.IJsonAPI {
|
||||
|
||||
public static class SkinMe extends UniSkinAPI {
|
||||
@Override public String getLoaderName() { return "SkinMe"; }
|
||||
@Override public String getRoot() { return "http://www.skinme.cc/uniskin/"; }
|
||||
}
|
||||
|
||||
public class UniSkinAPI implements IJsonAPI {
|
||||
private static final String TEXTURES="textures/";
|
||||
private static final String SUFFIX=".json";
|
||||
|
||||
@@ -40,7 +44,7 @@ public class UniSkinAPI implements IJsonAPI {
|
||||
|
||||
boolean hasSkin=false;
|
||||
for(String model:profile.model_preference){
|
||||
Model enumModel=ModelManager0.getEnumModel(model);
|
||||
ModelManager0.Model enumModel=ModelManager0.getEnumModel(model);
|
||||
if(enumModel==null||StringUtils.isEmpty(profile.skins.get(model)))
|
||||
continue;
|
||||
if(ModelManager0.isSkin(enumModel))
|
||||
|
||||
Reference in new issue
Block a user