Package logisticspipes.network.packets.module

Source Code of logisticspipes.network.packets.module.ModuleInventory

package logisticspipes.network.packets.module;

import logisticspipes.interfaces.IModuleInventoryReceive;
import logisticspipes.network.abstractpackets.InventoryModuleCoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import lombok.experimental.Accessors;
import net.minecraft.entity.player.EntityPlayer;

@Accessors(chain=true)
public class ModuleInventory extends InventoryModuleCoordinatesPacket {

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

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

  @Override
  public void processPacket(EntityPlayer player) {
    IModuleInventoryReceive module = this.getLogisticsModule(player, IModuleInventoryReceive.class);
    if(module == null) return;
    module.handleInvContent(getIdentList());
  }
}
TOP

Related Classes of logisticspipes.network.packets.module.ModuleInventory

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.