use of net.geforcemods.securitycraft.network.packets.PacketSToggleOption in project SecurityCraft by Geforce132.
the class GuiCustomizeBlock method actionPerformed.
@Override
protected void actionPerformed(GuiButton guibutton) {
if (!(guibutton instanceof GuiItemButton)) {
Option<?> tempOption = tileEntity.customOptions()[guibutton.id];
tempOption.toggle();
guibutton.packedFGColour = tempOption.toString().matches(tempOption.getDefaultValue().toString()) ? 16777120 : 14737632;
guibutton.displayString = getOptionButtonTitle(tempOption);
mod_SecurityCraft.network.sendToServer(new PacketSToggleOption(tileEntity.getPos().getX(), tileEntity.getPos().getY(), tileEntity.getPos().getZ(), guibutton.id));
}
}
Aggregations