package com.github.games647.changeskin.core.model.skin;

import com.google.common.base.Objects;

public class TextureModel {

    private static final String URL_PREFIX = "http://textures.minecraft.net/texture/";

    private final String url;
    private MetadataModel metadata;

    public TextureModel(String shortUrl, boolean slimModel) {
        this.url = URL_PREFIX + shortUrl;

        if (slimModel) {
            metadata = new MetadataModel();
        }
    }

    public TextureModel(String shortUrl) {
        this(shortUrl, false);
    }

    /**
     * @return can be null if not slim or this is a cape
     */
    public MetadataModel getMetadata() {
        return metadata;
    }

    public String getUrl() {
        return url;
    }

    public String getShortUrl() {
        return url.replace(URL_PREFIX, "");
    }

    @Override
    public String toString() {
        return Objects.toStringHelper(this)
                .add("url", url)
                .add("metadata", metadata)
                .toString();
    }
}

@@ -223,60 +223,60 @@
 ate 
-final String url;%0A    private MetadataModel metadata
+MetadataModel metadata;%0A    private final String url
 ;%0A%0A 

Fix slim model ordering for correct encoding behaviour (Fixes #100)