Search in sources :

Example 36 with Argument

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

the class GuiShield method changeDamageType.

private void changeDamageType() {
    tileEntity.setDamageMode(DamageTypeMode.getMode(damageType.getCurrentChoice()));
    sendServerCommand(RFToolsMessages.INSTANCE, ShieldTEBase.CMD_DAMAGEMODE, new Argument("mode", DamageTypeMode.getMode(damageType.getCurrentChoice()).getDescription()));
}
Also used : Argument(mcjty.lib.network.Argument)

Example 37 with Argument

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

the class GuiShield method moveFilterUp.

private void moveFilterUp() {
    sendServerCommand(RFToolsMessages.INSTANCE, ShieldTEBase.CMD_UPFILTER, new Argument("selected", filterList.getSelected()));
    listDirty = 0;
}
Also used : Argument(mcjty.lib.network.Argument)

Example 38 with Argument

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

the class GuiShield method applyCamoToShield.

private void applyCamoToShield() {
    ItemStack stack = tileEntity.getStackInSlot(0);
    int pass = 0;
    if (!stack.isEmpty()) {
        Block block = Block.getBlockFromItem(stack.getItem());
        if (block != null) {
            pass = block.getBlockLayer().ordinal();
        }
    }
    sendServerCommand(RFToolsMessages.INSTANCE, ShieldTEBase.CMD_APPLYCAMO, new Argument("pass", pass));
}
Also used : Argument(mcjty.lib.network.Argument) Block(net.minecraft.block.Block) ItemStack(net.minecraft.item.ItemStack)

Example 39 with Argument

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

the class GuiShield method moveFilterDown.

private void moveFilterDown() {
    sendServerCommand(RFToolsMessages.INSTANCE, ShieldTEBase.CMD_DOWNFILTER, new Argument("selected", filterList.getSelected()));
    listDirty = 0;
}
Also used : Argument(mcjty.lib.network.Argument)

Example 40 with Argument

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

the class GuiShield method removeSelectedFilter.

private void removeSelectedFilter() {
    sendServerCommand(RFToolsMessages.INSTANCE, ShieldTEBase.CMD_DELFILTER, new Argument("selected", filterList.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