Package logisticspipes.network.packets.modules

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

package logisticspipes.network.packets.modules;

import logisticspipes.modules.ModuleProvider;
import logisticspipes.network.abstractpackets.BooleanModuleCoordinatesPacket;
import logisticspipes.network.abstractpackets.ModernPacket;
import net.minecraft.entity.player.EntityPlayer;


public class ProviderModuleInclude extends BooleanModuleCoordinatesPacket {

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

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

  @Override
  public void processPacket(EntityPlayer player) {
    final ModuleProvider module = this.getLogisticsModule(player, ModuleProvider.class);
    if(module == null) return;
    module.setFilterExcluded(this.isFlag());
  }
}
TOP

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

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.