use of riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData in project Armourers-Workshop by RiskyKen.
the class GuiTabWardrobeColourSettings method mouseClicked.
@Override
public void mouseClicked(int mouseX, int mouseY, int button) {
if (button == 0 & selectingSkinColour) {
EquipmentWardrobeData ewd = new EquipmentWardrobeData(this.equipmentWardrobeData);
ewd.skinColour = skinColour.getRGB();
PacketHandler.networkWrapper.sendToServer(new MessageClientSkinWardrobeUpdate(ewd));
selectingSkinColour = false;
}
if (button == 0 & selectingHairColour) {
EquipmentWardrobeData ewd = new EquipmentWardrobeData(this.equipmentWardrobeData);
ewd.hairColour = hairColour.getRGB();
PacketHandler.networkWrapper.sendToServer(new MessageClientSkinWardrobeUpdate(ewd));
selectingHairColour = false;
}
super.mouseClicked(mouseX, mouseY, button);
}
use of riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData in project Armourers-Workshop by RiskyKen.
the class GuiTabWardrobeColourSettings method drawBackgroundLayer.
@Override
public void drawBackgroundLayer(float partialTickTime, int mouseX, int mouseY) {
GL11.glColor4f(1, 1, 1, 1);
// Top half of GUI. (active tab)
this.drawTexturedModalRect(this.x, this.y, 0, 0, 236, 151);
// Bottom half of GUI. (player inventory)
this.drawTexturedModalRect(this.x + 29, this.y + 151, 29, 151, 178, 89);
PlayerPointer playerPointer = new PlayerPointer(entityPlayer);
EquipmentWardrobeData newEwd = equipmentWardrobeData = ClientProxy.equipmentWardrobeHandler.getEquipmentWardrobeData(playerPointer);
if (newEwd != null) {
equipmentWardrobeData = newEwd;
}
float skinR = (float) skinColour.getRed() / 255;
float skinG = (float) skinColour.getGreen() / 255;
float skinB = (float) skinColour.getBlue() / 255;
// Skin colour display
this.drawTexturedModalRect(this.x + 68, this.y + 30, 242, 180, 14, 14);
GL11.glColor4f(skinR, skinG, skinB, 1F);
this.drawTexturedModalRect(this.x + 69, this.y + 31, 243, 181, 12, 12);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
float hairR = (float) hairColour.getRed() / 255;
float hairG = (float) hairColour.getGreen() / 255;
float hairB = (float) hairColour.getBlue() / 255;
// Hair colour display
this.drawTexturedModalRect(this.x + 68, this.y + 82, 242, 180, 14, 14);
GL11.glColor4f(hairR, hairG, hairB, 1F);
this.drawTexturedModalRect(this.x + 69, this.y + 83, 243, 181, 12, 12);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
}
use of riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData in project Armourers-Workshop by RiskyKen.
the class PaintingHelper method getLocalPlayersSkinColour.
@SideOnly(Side.CLIENT)
public static int getLocalPlayersSkinColour() {
PlayerPointer playerPointer = new PlayerPointer(Minecraft.getMinecraft().thePlayer);
EquipmentWardrobeData ewd = ClientProxy.equipmentWardrobeHandler.getEquipmentWardrobeData(playerPointer);
if (ewd != null) {
return ewd.skinColour;
}
return Color.decode("#F9DFD2").getRGB();
}
use of riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData in project Armourers-Workshop by RiskyKen.
the class PaintingHelper method getLocalPlayersHairColour.
@SideOnly(Side.CLIENT)
public static int getLocalPlayersHairColour() {
PlayerPointer playerPointer = new PlayerPointer(Minecraft.getMinecraft().thePlayer);
EquipmentWardrobeData ewd = ClientProxy.equipmentWardrobeHandler.getEquipmentWardrobeData(playerPointer);
if (ewd != null) {
return ewd.hairColour;
}
return Color.decode("#804020").getRGB();
}
use of riskyken.armourersWorkshop.common.skin.EquipmentWardrobeData in project Armourers-Workshop by RiskyKen.
the class EquipmentRenderHandler method isArmourRenderOverridden.
@Override
public boolean isArmourRenderOverridden(EntityPlayer player, int slotId) {
if (slotId < 4 & slotId >= 0) {
return false;
}
if (player == null) {
return false;
}
EquipmentWardrobeHandler ewh = ClientProxy.equipmentWardrobeHandler;
EquipmentWardrobeData ewd = ewh.getEquipmentWardrobeData(new PlayerPointer(player));
if (ewd != null) {
return ewd.armourOverride.get(slotId);
}
return false;
}
Aggregations