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());
}
}
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();
}
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);
}
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();
}
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();
}
Aggregations