Package logisticspipes.network.packets.pipe

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

package logisticspipes.network.packets.pipe;

import logisticspipes.network.PacketHandler;
import logisticspipes.network.abstractpackets.CoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import logisticspipes.pipes.PipeItemsInvSysConnector;
import logisticspipes.pipes.basic.LogisticsTileGenericPipe;
import logisticspipes.proxy.MainProxy;
import net.minecraft.entity.player.EntityPlayer;

public class InvSysConContentRequest extends CoordinatesPacket {

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

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

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
    if(pipe == null) {
      return;
    }
    if(pipe.pipe instanceof PipeItemsInvSysConnector) {
      MainProxy.sendPacketToPlayer(PacketHandler.getPacket(InvSysConContent.class).setIdentSet(((PipeItemsInvSysConnector)pipe.pipe).getExpectedItems()), player);
    }
  }
}
TOP

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

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.