Search in sources :

Example 1 with PacketGuiSelectRequest

use of forestry.core.network.packets.PacketGuiSelectRequest in project ForestryMC by ForestryMC.

the class GuiDatabase method onUpdateSelectedSlot.

public void onUpdateSelectedSlot(boolean changed) {
    upButton.enabled = manager.canSubtract();
    downButton.enabled = manager.canAdd();
    if (changed) {
        int index = getSelectedItem().invIndex;
        database.selectedSlot = manager.getSelectedSlot();
        NetworkUtil.sendToServer(new PacketGuiSelectRequest(ContainerDatabase.SELECT_ID, index));
        // databaseScreen.onChangeTabOrIndividual();
        databaseScreen.onItemChange(manager.getSelectedItemStack());
    }
}
Also used : PacketGuiSelectRequest(forestry.core.network.packets.PacketGuiSelectRequest)

Example 2 with PacketGuiSelectRequest

use of forestry.core.network.packets.PacketGuiSelectRequest in project ForestryMC by ForestryMC.

the class GuiWorktable method actionPerformed.

@Override
protected void actionPerformed(GuiButton button) {
    int id = 100 + button.id;
    NetworkUtil.sendToServer(new PacketGuiSelectRequest(id, 0));
    SoundUtil.playButtonClick();
}
Also used : PacketGuiSelectRequest(forestry.core.network.packets.PacketGuiSelectRequest)

Example 3 with PacketGuiSelectRequest

use of forestry.core.network.packets.PacketGuiSelectRequest in project ForestryMC by ForestryMC.

the class ContainerSolderingIron method sendSelectionChange.

@SideOnly(Side.CLIENT)
private static void sendSelectionChange(int index, int advance) {
    IForestryPacketServer packet = new PacketGuiSelectRequest(index, advance);
    NetworkUtil.sendToServer(packet);
}
Also used : PacketGuiSelectRequest(forestry.core.network.packets.PacketGuiSelectRequest) IForestryPacketServer(forestry.core.network.IForestryPacketServer) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Example 4 with PacketGuiSelectRequest

use of forestry.core.network.packets.PacketGuiSelectRequest in project ForestryMC by ForestryMC.

the class ProbeButton method handleMouseClick.

@Override
public void handleMouseClick(int mouseX, int mouseY, int mouseButton) {
    pressed = true;
    NetworkUtil.sendToServer(new PacketGuiSelectRequest(-1, 0));
    SoundUtil.playButtonClick();
}
Also used : PacketGuiSelectRequest(forestry.core.network.packets.PacketGuiSelectRequest)

Example 5 with PacketGuiSelectRequest

use of forestry.core.network.packets.PacketGuiSelectRequest in project ForestryMC by ForestryMC.

the class GameTokenWidget method handleMouseClick.

@Override
public void handleMouseClick(int mouseX, int mouseY, int mouseButton) {
    game.choose(index);
    NetworkUtil.sendToServer(new PacketGuiSelectRequest(index, 0));
    SoundUtil.playButtonClick();
}
Also used : PacketGuiSelectRequest(forestry.core.network.packets.PacketGuiSelectRequest)

Aggregations

PacketGuiSelectRequest (forestry.core.network.packets.PacketGuiSelectRequest)6 ITradeStationInfo (forestry.api.mail.ITradeStationInfo)1 IForestryPacketServer (forestry.core.network.IForestryPacketServer)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1