use of mcjty.lib.network.Argument in project RFToolsDimensions by McJty.
the class GuiDimletWorkbench method suggestParts.
private void suggestParts() {
int selected = itemList.getSelected();
if (selected == -1) {
return;
}
Widget widget = itemList.getChild(selected);
Object userObject = widget.getUserObject();
if (userObject instanceof DimletKey) {
DimletKey key = (DimletKey) userObject;
sendServerCommand(RFToolsDimMessages.INSTANCE, DimletWorkbenchTileEntity.CMD_SUGGESTPARTS, new Argument("type", key.getType().dimletType.getName()), new Argument("id", key.getId()));
}
}
use of mcjty.lib.network.Argument in project RFToolsDimensions by McJty.
the class GuiDimensionBuilder method changeRedstoneMode.
private void changeRedstoneMode() {
tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
sendServerCommand(RFToolsDimMessages.INSTANCE, DimensionBuilderTileEntity.CMD_RSMODE, new Argument("rs", RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class ScreenTileEntity method focusModuleClient.
public void focusModuleClient(double hitX, double hitY, double hitZ, EnumFacing side, EnumFacing horizontalFacing) {
ModuleRaytraceResult result = getHitModule(hitX, hitY, hitZ, side, horizontalFacing);
if (result == null) {
RFToolsMessages.INSTANCE.sendToServer(new PacketServerCommand(getPos(), CMD_HOVER, new Argument("x", -1), new Argument("y", -1), new Argument("module", -1)));
return;
}
RFToolsMessages.INSTANCE.sendToServer(new PacketServerCommand(getPos(), CMD_HOVER, new Argument("x", result.getX()), new Argument("y", result.getY() - result.getCurrenty()), new Argument("module", result.getModuleIndex())));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiRelay method addArgument.
private void addArgument(List<Argument> arguments, int i, String suffix) {
char prefix = RelayTileEntity.DUNSWE.charAt(i);
String key = prefix + suffix;
int energy = Integer.parseInt(energyValues.get(key).getText());
boolean input = "Input".equals(inputOutputs.get(key).getCurrentChoice());
arguments.add(new Argument(key, energy));
arguments.add(new Argument(prefix + "In" + suffix, input));
}
use of mcjty.lib.network.Argument in project RFTools by McJty.
the class GuiDialingDevice method interruptDial.
private void interruptDial() {
int transmitterSelected = transmitterList.getSelected();
TransmitterInfo transmitterInfo = getSelectedTransmitter(transmitterSelected);
if (transmitterInfo == null) {
return;
}
RFToolsMessages.INSTANCE.sendToServer(new PacketRequestIntegerFromServer(RFTools.MODID, tileEntity.getPos(), DialingDeviceTileEntity.CMD_DIAL, DialingDeviceTileEntity.CLIENTCMD_DIAL, new Argument("player", mc.player.getName()), new Argument("trans", transmitterInfo.getCoordinate()), new Argument("transDim", mc.world.provider.getDimension()), new Argument("c", (BlockPos) null), new Argument("dim", 0)));
lastDialedTransmitter = true;
listDirty = 0;
}
Aggregations