Package logisticspipes.network.packets.hud

Source Code of logisticspipes.network.packets.hud.ChestContent

package logisticspipes.network.packets.hud;

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

public class ChestContent extends InventoryModuleCoordinatesPacket {

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

  @Override
  public ModernPacket template() {
    return new ChestContent(getId());
  }
 
  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe tile = this.getPipe(player.worldObj);
    if(tile != null && tile.pipe instanceof IChestContentReceiver) {
      ((IChestContentReceiver) tile.pipe).setReceivedChestContent(getIdentList());
    }
   
  }

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

Related Classes of logisticspipes.network.packets.hud.ChestContent

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.