Search in sources :

Example 76 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiCoalGenerator method changeRedstoneMode.

private void changeRedstoneMode() {
    tileEntity.setRSMode(RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()]);
    sendServerCommand(RFToolsMessages.INSTANCE, CoalGeneratorTileEntity.CMD_RSMODE, new Argument("rs", RedstoneMode.values()[redstoneMode.getCurrentChoiceIndex()].getDescription()));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 77 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiItemFilter method changeMode.

private void changeMode(int side, int slot) {
    ImageChoiceLabel choiceLabel = bits[side * ItemFilterContainer.BUFFER_SIZE + slot];
    int c = choiceLabel.getCurrentChoiceIndex();
    boolean input = false;
    boolean output = false;
    if (c == 1) {
        input = true;
        output = false;
    } else if (c == 2) {
        input = false;
        output = true;
    }
    sendServerCommand(RFToolsMessages.INSTANCE, ItemFilterTileEntity.CMD_SETMODE, new Argument("side", side), new Argument("slot", slot), new Argument("input", input), new Argument("output", output));
}
Also used : Argument(mcjty.lib.network.Argument) ImageChoiceLabel(mcjty.lib.gui.widgets.ImageChoiceLabel)

Example 78 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiTimer method setRedstonePauses.

private void setRedstonePauses() {
    boolean pauses = redstonePauses.isPressed();
    tileEntity.setRedstonePauses(pauses);
    sendServerCommand(RFToolsMessages.INSTANCE, TimerTileEntity.CMD_SETPAUSES, new Argument("pauses", pauses));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 79 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiTimer method setDelay.

private void setDelay() {
    String d = speedField.getText();
    int delay;
    try {
        delay = Integer.parseInt(d);
    } catch (NumberFormatException e) {
        delay = 1;
    }
    tileEntity.setDelay(delay);
    sendServerCommand(RFToolsMessages.INSTANCE, TimerTileEntity.CMD_SETDELAY, new Argument("delay", delay));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 80 with Argument

use of mcjty.lib.network.Argument in project RFTools by McJty.

the class GuiEnvironmentalController method delPlayer.

private void delPlayer() {
    sendServerCommand(RFToolsMessages.INSTANCE, EnvironmentalControllerTileEntity.CMD_DELPLAYER, new Argument("player", players.get(playersList.getSelected())));
    listDirty = 0;
}
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