use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientSkinWardrobeUpdate in project Armourers-Workshop by RiskyKen.
the class GuiTabWardrobeColourSettings method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) {
if (button == selectSkinButton) {
selectingSkinColour = true;
}
if (button == selectHairButton) {
selectingHairColour = true;
}
if (button == autoSkinButton) {
int newSkinColour = equipmentWardrobeData.autoColourSkin((AbstractClientPlayer) this.entityPlayer);
EquipmentWardrobeData ewd = new EquipmentWardrobeData(this.equipmentWardrobeData);
ewd.skinColour = newSkinColour;
PacketHandler.networkWrapper.sendToServer(new MessageClientSkinWardrobeUpdate(ewd));
}
if (button == autoHairButton) {
int newHairColour = equipmentWardrobeData.autoColourHair((AbstractClientPlayer) this.entityPlayer);
EquipmentWardrobeData ewd = new EquipmentWardrobeData(this.equipmentWardrobeData);
ewd.hairColour = newHairColour;
PacketHandler.networkWrapper.sendToServer(new MessageClientSkinWardrobeUpdate(ewd));
}
}
use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientSkinWardrobeUpdate in project Armourers-Workshop by RiskyKen.
the class GuiTabWardrobeDisplaySettings method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) {
if (button instanceof GuiCheckBox) {
headOverlay = !overlayOverrideCheck[0].isChecked();
for (int i = 0; i < 4; i++) {
armourOverride.set(i, !armourOverrideCheck[i].isChecked());
}
}
if (button.id >= 1) {
equipmentWardrobeData.headOverlay = headOverlay;
equipmentWardrobeData.armourOverride = armourOverride;
equipmentWardrobeData.limitLimbs = limitLimbsCheck.isChecked();
PacketHandler.networkWrapper.sendToServer(new MessageClientSkinWardrobeUpdate(equipmentWardrobeData));
}
}
use of riskyken.armourersWorkshop.common.network.messages.client.MessageClientSkinWardrobeUpdate 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);
}
Aggregations