use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiEnvironmentalController method changeRedstoneMode.
private void changeRedstoneMode() {
tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
sendServerCommand(RFToolsMessages.INSTANCE, EnvironmentalControllerTileEntity.CMD_RSMODE, new Argument("rs", RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiCounter method setCounter.
private void setCounter() {
String d = counterField.getText();
int counter;
try {
counter = Integer.parseInt(d);
} catch (NumberFormatException e) {
counter = 1;
}
tileEntity.setCounter(counter);
sendServerCommand(RFToolsMessages.INSTANCE, CounterTileEntity.CMD_SETCOUNTER, new Argument("counter", counter));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiCounter method setCurrent.
private void setCurrent() {
String d = currentField.getText();
int current;
try {
current = Integer.parseInt(d);
} catch (NumberFormatException e) {
current = 0;
}
tileEntity.setCounter(current);
sendServerCommand(RFToolsMessages.INSTANCE, CounterTileEntity.CMD_SETCURRENT, new Argument("current", current));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiInvChecker method setAmount.
private void setAmount() {
String d = amountField.getText();
int amount;
try {
amount = Integer.parseInt(d);
} catch (NumberFormatException e) {
amount = 1;
}
tileEntity.setAmount(amount);
sendServerCommand(RFToolsMessages.INSTANCE, InvCheckerTileEntity.CMD_SETAMOUNT, new Argument("amount", amount));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiInvChecker method setMetaUsage.
private void setMetaUsage() {
boolean b = META_MATCH.equals(metaLabel.getCurrentChoice());
tileEntity.setUseMeta(b);
sendServerCommand(RFToolsMessages.INSTANCE, InvCheckerTileEntity.CMD_SETMETA, new Argument("b", b));
}
Aggregations