Package logisticspipes.network.packets.pipe

Source Code of logisticspipes.network.packets.pipe.SendQueueContent

package logisticspipes.network.packets.pipe;

import logisticspipes.interfaces.ISendQueueContentRecieiver;
import logisticspipes.network.abstractpackets.InventoryModuleCoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import logisticspipes.pipes.basic.LogisticsTileGenericPipe;
import net.minecraft.entity.player.EntityPlayer;

public class SendQueueContent extends InventoryModuleCoordinatesPacket {

  public SendQueueContent(int id) {
    super(id);
  }

  @Override
  public ModernPacket template() {
    return new SendQueueContent(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
    if(pipe == null) {
      return;
    }
    if(pipe.pipe instanceof ISendQueueContentRecieiver) {
      ISendQueueContentRecieiver receiver = (ISendQueueContentRecieiver) pipe.pipe;
      receiver.handleSendQueueItemIdentifierList(getIdentList());
    }
  }

  @Override
  public boolean isCompressable() {
    return true;
  }
}
TOP

Related Classes of logisticspipes.network.packets.pipe.SendQueueContent

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.