use of riskyken.armourersWorkshop.common.skin.data.SkinProperties in project Armourers-Workshop by RiskyKen.
the class GuiTabArmourerSkinSettings method actionPerformed.
@Override
protected void actionPerformed(GuiButton button) {
SkinProperties skinProps = tileEntity.getSkinProps();
if (!checkBlockMultiblock.isChecked()) {
checkBlockBed.enabled = false;
checkBlockBed.setIsChecked(false);
} else {
checkBlockBed.enabled = true;
}
checkBlockEnderInventory.enabled = !checkBlockInventory.isChecked();
checkBlockInventory.enabled = !checkBlockEnderInventory.isChecked();
if (checkBlockInventory.isChecked()) {
checkBlockEnderInventory.setIsChecked(false);
}
if (checkBlockEnderInventory.isChecked()) {
checkBlockInventory.setIsChecked(false);
}
// TODO remove to re-enable beds
checkBlockBed.enabled = false;
if (button == checkBlockGlowing | button == checkBlockLadder | button == checkBlockNoCollision | button == checkBlockSeat | button == checkBlockMultiblock | button == checkBlockBed | button == checkBlockInventory | button == inventorySize | button == checkBlockEnderInventory) {
SkinProperties.PROP_BLOCK_GLOWING.setValue(skinProps, checkBlockGlowing.isChecked());
SkinProperties.PROP_BLOCK_LADDER.setValue(skinProps, checkBlockLadder.isChecked());
SkinProperties.PROP_BLOCK_NO_COLLISION.setValue(skinProps, checkBlockNoCollision.isChecked());
SkinProperties.PROP_BLOCK_SEAT.setValue(skinProps, checkBlockSeat.isChecked());
SkinProperties.PROP_BLOCK_MULTIBLOCK.setValue(skinProps, checkBlockMultiblock.isChecked());
SkinProperties.PROP_BLOCK_BED.setValue(skinProps, checkBlockBed.isChecked());
SkinProperties.PROP_BLOCK_INVENTORY.setValue(skinProps, checkBlockInventory.isChecked());
SkinProperties.PROP_BLOCK_ENDER_INVENTORY.setValue(skinProps, checkBlockEnderInventory.isChecked());
SkinProperties.PROP_BLOCK_INVENTORY_WIDTH.setValue(skinProps, inventorySize.getSelectionWidth());
SkinProperties.PROP_BLOCK_INVENTORY_HEIGHT.setValue(skinProps, inventorySize.getSelectionHeight());
PacketHandler.networkWrapper.sendToServer(new MessageClientGuiSetArmourerSkinProps(skinProps));
}
if (button == checkArmourOverrideBodyPart | button == checkArmourHideOverlay) {
SkinProperties.PROP_ARMOUR_OVERRIDE.setValue(skinProps, checkArmourOverrideBodyPart.isChecked());
SkinProperties.PROP_ARMOUR_HIDE_OVERLAY.setValue(skinProps, checkArmourHideOverlay.isChecked());
PacketHandler.networkWrapper.sendToServer(new MessageClientGuiSetArmourerSkinProps(skinProps));
}
inventorySize.visible = checkBlockInventory.isChecked();
}
Aggregations