use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiBuilder method selectAnchor.
private void selectAnchor(int index) {
updateAnchorSettings(index);
sendServerCommand(RFToolsMessages.INSTANCE, CMD_SETANCHOR, new Argument("anchor", index));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class EndergenicTileEntity method setDestination.
public void setDestination(BlockPos destination) {
markDirtyQuick();
this.destination = destination;
distance = calculateDistance(destination);
if (getWorld().isRemote) {
// We're on the client. Send change to server.
RFToolsMessages.INSTANCE.sendToServer(new PacketServerCommand(getPos(), EndergenicTileEntity.CMD_SETDESTINATION, new Argument("dest", destination)));
}
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiBlockProtector method changeRedstoneMode.
private void changeRedstoneMode() {
tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
sendServerCommand(RFToolsMessages.INSTANCE, BlockProtectorTileEntity.CMD_RSMODE, new Argument("rs", RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiSensor method setType.
private void setType() {
SensorType sensorType = getSensorType();
tileEntity.setSensorType(sensorType);
sendServerCommand(RFToolsMessages.INSTANCE, SensorTileEntity.CMD_SETTYPE, new Argument("type", sensorType.ordinal()));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiSensor method setNumber.
private void setNumber() {
String d = numberField.getText();
int number;
try {
number = Integer.parseInt(d);
} catch (NumberFormatException e) {
number = 1;
}
tileEntity.setNumber(number);
sendServerCommand(RFToolsMessages.INSTANCE, SensorTileEntity.CMD_SETNUMBER, new Argument("number", number));
}
Aggregations