2016-11-16 23:45:04 -05:00
|
|
|
package com.minelittlepony.hdskins.gui;
|
2015-08-01 18:36:33 -04:00
|
|
|
|
2016-11-24 23:40:19 -05:00
|
|
|
import com.minelittlepony.MineLittlePony;
|
2016-11-16 23:45:04 -05:00
|
|
|
import com.minelittlepony.PonyManager;
|
2015-08-01 18:36:33 -04:00
|
|
|
import com.mojang.authlib.GameProfile;
|
2016-12-21 01:20:02 -05:00
|
|
|
import com.mojang.authlib.minecraft.MinecraftProfileTexture;
|
2015-08-01 18:36:33 -04:00
|
|
|
import com.voxelmodpack.hdskins.gui.EntityPlayerModel;
|
2015-08-12 20:03:54 -04:00
|
|
|
import com.voxelmodpack.hdskins.gui.GuiSkins;
|
2016-11-24 02:01:23 -05:00
|
|
|
|
|
|
|
import java.awt.image.BufferedImage;
|
2015-08-01 18:36:33 -04:00
|
|
|
|
2015-08-12 20:03:54 -04:00
|
|
|
public class GuiSkinsMineLP extends GuiSkins {
|
2015-08-01 18:36:33 -04:00
|
|
|
|
2015-11-17 00:17:35 -05:00
|
|
|
private PonyManager ponyManager;
|
2016-05-18 05:48:46 -04:00
|
|
|
|
2015-11-17 00:17:35 -05:00
|
|
|
public GuiSkinsMineLP(PonyManager manager) {
|
|
|
|
this.ponyManager = manager;
|
|
|
|
}
|
2016-05-18 05:48:46 -04:00
|
|
|
|
2015-08-01 18:36:33 -04:00
|
|
|
@Override
|
2015-08-12 20:03:54 -04:00
|
|
|
protected EntityPlayerModel getModel(GameProfile profile) {
|
|
|
|
return new EntityPonyModel(profile);
|
2015-08-01 18:36:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-12-21 01:20:02 -05:00
|
|
|
protected void onSetLocalSkin(BufferedImage skin, MinecraftProfileTexture.Type type) {
|
2016-11-24 23:40:19 -05:00
|
|
|
MineLittlePony.logger.debug("Invalidating old local skin, checking updated local skin");
|
2017-06-16 01:41:36 -04:00
|
|
|
ponyManager.removePony(this.localPlayer.getSkinTexture());
|
2015-08-01 18:36:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-12-21 01:20:02 -05:00
|
|
|
protected void onSetRemoteSkin(MinecraftProfileTexture.Type type) {
|
|
|
|
MineLittlePony.logger.debug("Invalidating old remote skin, checking updated remote skin");
|
2017-06-16 01:41:36 -04:00
|
|
|
ponyManager.removePony(this.remotePlayer.getSkinTexture());
|
2015-08-01 18:36:33 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onGuiClosed() {
|
|
|
|
super.onGuiClosed();
|
2017-06-16 01:41:36 -04:00
|
|
|
ponyManager.removePony(this.localPlayer.getSkinTexture());
|
|
|
|
ponyManager.removePony(this.remotePlayer.getSkinTexture());
|
2015-08-11 14:30:38 -04:00
|
|
|
|
|
|
|
}
|
2015-08-01 18:36:33 -04:00
|
|
|
}
|