Search in sources :

Example 1 with IForestryPacketServer

use of forestry.core.network.IForestryPacketServer in project ForestryMC by ForestryMC.

the class EntityMinecartBeeHousingBase method onUpdate.

@Override
public void onUpdate() {
    super.onUpdate();
    tickHelper.onTick();
    if (!world.isRemote) {
        if (beeLogic.canWork()) {
            beeLogic.doWork();
        }
    } else {
        if (needsActiveUpdate) {
            IForestryPacketServer packet = new PacketBeeLogicEntityRequest(this);
            NetworkUtil.sendToServer(packet);
            needsActiveUpdate = false;
        }
        if (beeLogic.canDoBeeFX()) {
            if (tickHelper.updateOnInterval(beeFXInterval)) {
                beeLogic.doBeeFX();
            }
            if (tickHelper.updateOnInterval(pollenFXInterval)) {
                TileBeeHousingBase.doPollenFX(world, posX - 0.5, posY - 0.1, posZ - 0.5);
            }
        }
    }
}
Also used : IForestryPacketServer(forestry.core.network.IForestryPacketServer) PacketBeeLogicEntityRequest(forestry.apiculture.network.packets.PacketBeeLogicEntityRequest)

Example 2 with IForestryPacketServer

use of forestry.core.network.IForestryPacketServer 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)

Aggregations

IForestryPacketServer (forestry.core.network.IForestryPacketServer)2 PacketBeeLogicEntityRequest (forestry.apiculture.network.packets.PacketBeeLogicEntityRequest)1 PacketGuiSelectRequest (forestry.core.network.packets.PacketGuiSelectRequest)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1