Search in sources :

Example 6 with PacketGuiUpdate

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

the class ContainerEngineBiogas method detectAndSendChanges.

@Override
public void detectAndSendChanges() {
    super.detectAndSendChanges();
    PacketGuiUpdate packet = new PacketGuiUpdate(tile);
    sendPacketToListeners(packet);
}
Also used : PacketGuiUpdate(forestry.core.network.packets.PacketGuiUpdate)

Example 7 with PacketGuiUpdate

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

the class ContainerEngineElectric method detectAndSendChanges.

@Override
public void detectAndSendChanges() {
    super.detectAndSendChanges();
    PacketGuiUpdate packet = new PacketGuiUpdate(tile);
    sendPacketToListeners(packet);
}
Also used : PacketGuiUpdate(forestry.core.network.packets.PacketGuiUpdate)

Example 8 with PacketGuiUpdate

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

the class ContainerGenerator method detectAndSendChanges.

@Override
public void detectAndSendChanges() {
    super.detectAndSendChanges();
    PacketGuiUpdate packet = new PacketGuiUpdate(tile);
    sendPacketToListeners(packet);
}
Also used : PacketGuiUpdate(forestry.core.network.packets.PacketGuiUpdate)

Example 9 with PacketGuiUpdate

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

the class ContainerEscritoire method detectAndSendChanges.

@Override
public void detectAndSendChanges() {
    super.detectAndSendChanges();
    long gameLastUpdate = tile.getGame().getLastUpdate();
    if (lastUpdate != gameLastUpdate) {
        lastUpdate = gameLastUpdate;
        sendPacketToListeners(new PacketGuiUpdate(tile));
    }
}
Also used : PacketGuiUpdate(forestry.core.network.packets.PacketGuiUpdate)

Example 10 with PacketGuiUpdate

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

the class ContainerClimatiser method detectAndSendChanges.

@Override
public void detectAndSendChanges() {
    super.detectAndSendChanges();
    ItemStack socket = tile.getSocket(0);
    if (socket.isEmpty() && !this.socket.isEmpty() || !socket.isEmpty() && this.socket.isEmpty()) {
        PacketGuiUpdate packet = new PacketGuiUpdate(tile);
        sendPacketToListeners(packet);
    }
}
Also used : PacketGuiUpdate(forestry.core.network.packets.PacketGuiUpdate) ItemStack(net.minecraft.item.ItemStack)

Aggregations

PacketGuiUpdate (forestry.core.network.packets.PacketGuiUpdate)12 IForestryPacketClient (forestry.core.network.IForestryPacketClient)2 IErrorLogicSource (forestry.api.core.IErrorLogicSource)1 IErrorState (forestry.api.core.IErrorState)1 PacketErrorUpdate (forestry.core.network.packets.PacketErrorUpdate)1 PacketGuiEnergy (forestry.core.network.packets.PacketGuiEnergy)1 IPowerHandler (forestry.core.tiles.IPowerHandler)1 TilePowered (forestry.core.tiles.TilePowered)1 EnergyManager (forestry.energy.EnergyManager)1 ItemStack (net.minecraft.item.ItemStack)1