2018-08-26 04:40:07 +02:00
|
|
|
package com.minelittlepony;
|
|
|
|
|
2018-08-27 00:30:04 +02:00
|
|
|
import com.mojang.authlib.GameProfile;
|
2018-08-26 04:40:07 +02:00
|
|
|
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
|
|
|
import com.voxelmodpack.hdskins.ISkinParser;
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
public class PonySkinParser implements ISkinParser {
|
|
|
|
|
|
|
|
@Override
|
2018-08-27 00:30:04 +02:00
|
|
|
public void parse(GameProfile profile, MinecraftProfileTexture.Type type, ResourceLocation resource,
|
|
|
|
Map<String, String> metadata) {
|
2018-08-26 04:40:07 +02:00
|
|
|
if (type == MinecraftProfileTexture.Type.SKIN) {
|
|
|
|
boolean slim = "slim".equals(metadata.get("model"));
|
|
|
|
// TODO use proper model metadata system
|
|
|
|
|
|
|
|
metadata.put("model", MineLittlePony.getInstance().getManager()
|
2018-08-27 00:30:04 +02:00
|
|
|
.getPony(resource, profile.getId())
|
2018-08-26 04:40:07 +02:00
|
|
|
.getRace(false)
|
|
|
|
.getModel()
|
|
|
|
.getId(slim));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|