package logisticspipes.network.packets.pipe;
import logisticspipes.modules.ModuleCrafter;
import logisticspipes.network.abstractpackets.IntegerModuleCoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import net.minecraft.entity.player.EntityPlayer;
public class CraftingPriority extends IntegerModuleCoordinatesPacket {
public CraftingPriority(int id) {
super(id);
}
@Override
public ModernPacket template() {
return new CraftingPriority(getId());
}
@Override
public void processPacket(EntityPlayer player) {
ModuleCrafter module = this.getLogisticsModule(player, ModuleCrafter.class);
if(module == null) return;
module.setPriority(getInteger());
}
}