Search in sources :

Example 66 with Argument

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));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 67 with Argument

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)));
    }
}
Also used : Argument(mcjty.lib.network.Argument) PacketServerCommand(mcjty.lib.network.PacketServerCommand)

Example 68 with Argument

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()));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 69 with Argument

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()));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 70 with Argument

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));
}
Also used : Argument(mcjty.lib.network.Argument)

Aggregations

Argument (mcjty.lib.network.Argument)97 PositionalLayout (mcjty.lib.gui.layout.PositionalLayout)8 Window (mcjty.lib.gui.Window)7 Panel (mcjty.lib.gui.widgets.Panel)6 ItemStack (net.minecraft.item.ItemStack)6 PacketServerCommand (mcjty.lib.network.PacketServerCommand)4 ArrayList (java.util.ArrayList)3 GenericGuiContainer (mcjty.lib.container.GenericGuiContainer)3 HorizontalLayout (mcjty.lib.gui.layout.HorizontalLayout)3 Label (mcjty.lib.gui.widgets.Label)3 PacketRequestIntegerFromServer (mcjty.lib.network.PacketRequestIntegerFromServer)3 java.awt (java.awt)2 Rectangle (java.awt.Rectangle)2 StyleConfig (mcjty.lib.base.StyleConfig)2 GenericEnergyStorageTileEntity (mcjty.lib.entity.GenericEnergyStorageTileEntity)2 HorizontalAlignment (mcjty.lib.gui.layout.HorizontalAlignment)2 VerticalLayout (mcjty.lib.gui.layout.VerticalLayout)2 mcjty.lib.gui.widgets (mcjty.lib.gui.widgets)2 ChoiceLabel (mcjty.lib.gui.widgets.ChoiceLabel)2 TextField (mcjty.lib.gui.widgets.TextField)2