Search in sources :

Example 71 with Argument

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

the class GuiSequencer method changeMode.

private void changeMode() {
    SequencerMode newMode = SequencerMode.getMode(mode.getCurrentChoice());
    tileEntity.setMode(newMode);
    sendServerCommand(RFToolsMessages.INSTANCE, SequencerTileEntity.CMD_MODE, new Argument("mode", newMode.getDescription()));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 72 with Argument

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

the class GuiSequencer 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, SequencerTileEntity.CMD_SETDELAY, new Argument("delay", delay));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 73 with Argument

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

the class GuiSequencer method setCount.

private void setCount() {
    String c = countField.getText();
    int count;
    try {
        count = Integer.parseInt(c);
    } catch (NumberFormatException e) {
        count = 64;
    }
    tileEntity.setStepCount(count);
    sendServerCommand(RFToolsMessages.INSTANCE, SequencerTileEntity.CMD_SETCOUNT, new Argument("count", count));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 74 with Argument

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

the class GuiInvChecker method setOredictUsage.

private void setOredictUsage() {
    boolean b = OREDICT_USE.equals(oreDictLabel.getCurrentChoice());
    tileEntity.setOreDict(b);
    sendServerCommand(RFToolsMessages.INSTANCE, InvCheckerTileEntity.CMD_SETOREDICT, new Argument("b", b));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 75 with Argument

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

the class GuiInvChecker method setSlot.

private void setSlot() {
    String d = slotField.getText();
    int slot;
    try {
        slot = Integer.parseInt(d);
    } catch (NumberFormatException e) {
        slot = 0;
    }
    tileEntity.setSlot(slot);
    sendServerCommand(RFToolsMessages.INSTANCE, InvCheckerTileEntity.CMD_SETSLOT, new Argument("slot", slot));
}
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