mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 08:14:23 +01:00
Update dependencies
This commit is contained in:
parent
2f38419bc2
commit
0af45cf388
4 changed files with 28 additions and 26 deletions
|
@ -18,5 +18,5 @@ org.gradle.daemon=false
|
|||
|
||||
# Dependencies
|
||||
fabric_version=0.3.0+
|
||||
kirin_version=1.14.3-1.1.1-SNAPSHOT
|
||||
hd_skins_version=1.14.3-5.1.1-SNAPSHOT
|
||||
kirin_version=1.14.3-1.1.2-SNAPSHOT
|
||||
hd_skins_version=1.14.3-5.2.0-SNAPSHOT
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
package com.minelittlepony.client;
|
||||
|
||||
import com.minelittlepony.common.util.TextureConverter;
|
||||
|
||||
/**
|
||||
* Called to convert the legacy 64x32 skins to the new 64x64 format.
|
||||
*
|
||||
* Vanilla components are handle upstream, so all this really has to
|
||||
* do is copy the wing across.
|
||||
*
|
||||
*/
|
||||
public class LegacySkinConverter implements TextureConverter {
|
||||
|
||||
@Override
|
||||
public void convertTexture(Drawer drawer) {
|
||||
// ( from ) ( to ) (size) flipX flipY
|
||||
drawer.copy(58, 16, 58, 32, 2, 2, true, false); // top
|
||||
drawer.copy(60, 16, 60, 32, 2, 2, true, false); // bottom
|
||||
drawer.copy(60, 18, 56, 34, 2, 14, true, false); // inside
|
||||
drawer.copy(58, 18, 58, 34, 2, 14, true, false); // back
|
||||
drawer.copy(56, 18, 60, 34, 2, 14, true, false); // outside
|
||||
drawer.copy(62, 18, 62, 34, 2, 14, true, false); // front
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
package com.minelittlepony.client;
|
||||
|
||||
import com.minelittlepony.hdskins.ISkinModifier;
|
||||
|
||||
public class PonySkinModifier implements ISkinModifier {
|
||||
|
||||
@Override
|
||||
public void convertSkin(IDrawer drawer) {
|
||||
// copies the wing across for old legacy textures.
|
||||
|
||||
// Scale factor so we can support texture sizes beyond 64x64
|
||||
int scale = drawer.getImage().getWidth() / 64;
|
||||
|
||||
// ( from ) ( to ) (size) flipX flipY
|
||||
drawer.draw(scale, 58, 16, 58, 32, 2, 2, true, false); // top
|
||||
drawer.draw(scale, 60, 16, 60, 32, 2, 2, true, false); // bottom
|
||||
drawer.draw(scale, 60, 18, 56, 34, 2, 14, true, false); // inside
|
||||
drawer.draw(scale, 58, 18, 58, 34, 2, 14, true, false); // back
|
||||
drawer.draw(scale, 56, 18, 60, 34, 2, 14, true, false); // outside
|
||||
drawer.draw(scale, 62, 18, 62, 34, 2, 14, true, false); // front
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@ import net.minecraft.util.Identifier;
|
|||
|
||||
import com.minelittlepony.common.client.IModUtilities;
|
||||
import com.minelittlepony.client.MineLPClient;
|
||||
import com.minelittlepony.client.PonySkinModifier;
|
||||
import com.minelittlepony.client.LegacySkinConverter;
|
||||
import com.minelittlepony.client.settings.ClientPonyConfig;
|
||||
import com.minelittlepony.hdskins.HDSkins;
|
||||
import com.minelittlepony.hdskins.ISkinCacheClearListener;
|
||||
|
@ -61,7 +61,7 @@ public class MineLPHDSkins extends MineLPClient implements ISkinCacheClearListen
|
|||
HDSkins manager = HDSkins.getInstance();
|
||||
|
||||
// Convert legacy pony skins
|
||||
manager.addSkinModifier(new PonySkinModifier());
|
||||
manager.addSkinModifier(new LegacySkinConverter());
|
||||
// Parse trigger pixel data
|
||||
manager.addSkinParser(new PonySkinParser());
|
||||
// Clear ponies when skins are cleared
|
||||
|
|
Loading…
Reference in a new issue