Search in sources :

Example 1 with PacketBeeLogicEntityRequest

use of forestry.apiculture.network.packets.PacketBeeLogicEntityRequest 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)

Aggregations

PacketBeeLogicEntityRequest (forestry.apiculture.network.packets.PacketBeeLogicEntityRequest)1 IForestryPacketServer (forestry.core.network.IForestryPacketServer)1