Package logisticspipes.network.packets.modules

Source Code of logisticspipes.network.packets.modules.ExtractorModuleMode

package logisticspipes.network.packets.modules;

import logisticspipes.modules.abstractmodules.LogisticsSneakyDirectionModule;
import logisticspipes.network.abstractpackets.DirectionModuleCoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import lombok.experimental.Accessors;
import net.minecraft.entity.player.EntityPlayer;

@Accessors(chain=true)
public class ExtractorModuleMode extends DirectionModuleCoordinatesPacket {
 
  public ExtractorModuleMode(int id) {
    super(id);
  }

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

  @Override
  public void processPacket(EntityPlayer player) {
    LogisticsSneakyDirectionModule recieiver = this.getLogisticsModule(player, LogisticsSneakyDirectionModule.class);
    if(recieiver == null) return;
    recieiver.setSneakyDirection(getDirection());
  }
}
TOP

Related Classes of logisticspipes.network.packets.modules.ExtractorModuleMode

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.