use of network.rs485.logisticspipes.property.BooleanProperty in project LogisticsPipes by RS485.
the class GuiSupplierPipe method actionPerformed.
@Override
protected void actionPerformed(GuiButton guibutton) throws IOException {
if (guibutton.id == 0) {
if (hasPatternUpgrade) {
final PatternMode newMode = patternModeOverlay.write(EnumProperty::next);
buttonList.get(0).displayString = newMode.toString();
} else {
final SupplyMode newMode = requestModeOverlay.write(EnumProperty::next);
buttonList.get(0).displayString = newMode.toString();
}
} else if (hasPatternUpgrade) {
if (guibutton.id == 1) {
limitedPropertyOverlay.write(BooleanProperty::toggle);
buttonList.get(1).displayString = getLimitationText();
} else if (guibutton.id >= 2 && guibutton.id <= 10) {
MainProxy.sendPacketToServer(PacketHandler.getPacket(SlotFinderOpenGuiPacket.class).setSlot(guibutton.id - 2).setModulePos(supplierModule));
}
}
super.actionPerformed(guibutton);
}
Aggregations