MineLittlePony/src/main/java/com/minelittlepony/hdskins/gui/GuiSkinsMineLP.java

45 lines
1.4 KiB
Java
Raw Normal View History

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;
import com.voxelmodpack.hdskins.gui.GuiSkins;
import java.awt.image.BufferedImage;
2015-08-01 18:36:33 -04:00
public class GuiSkinsMineLP extends GuiSkins {
2015-08-01 18:36:33 -04:00
private PonyManager ponyManager;
public GuiSkinsMineLP(PonyManager manager) {
this.ponyManager = manager;
}
2015-08-01 18:36:33 -04:00
@Override
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
}