Package logisticspipes.network.packets.module

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

package logisticspipes.network.packets.module;

import logisticspipes.modules.ModuleThaumicAspectSink;
import logisticspipes.network.abstractpackets.ModernPacket;
import logisticspipes.network.abstractpackets.NBTModuleCoordinatesPacket;
import logisticspipes.proxy.MainProxy;
import lombok.experimental.Accessors;
import net.minecraft.entity.player.EntityPlayer;

@Accessors(chain=true)
public class ThaumicAspectsSinkList extends NBTModuleCoordinatesPacket {

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

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

  @Override
  public void processPacket(EntityPlayer player) {
    ModuleThaumicAspectSink module = this.getLogisticsModule(player, ModuleThaumicAspectSink.class);
    if(module == null) return;
    module.readFromNBT(getTag());
    if(MainProxy.isServer(player.getEntityWorld()) && this.getType().isInWorld()) {
      module.aspectListChanged();
    }
  }
}
TOP

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

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.