Package logisticspipes.pipes.basic

Examples of logisticspipes.pipes.basic.LogisticsTileGenericPipe


    return new GuiChassiPipe(player, (PipeLogisticsChassi)pipe.pipe);
  }

  @Override
  public DummyContainer getContainer(EntityPlayer player) {
    LogisticsTileGenericPipe pipe = this.getPipe(player.getEntityWorld());
    if(pipe == null || pipe.pipe == null || !(pipe.pipe instanceof PipeLogisticsChassi)) return null;
    PipeLogisticsChassi _chassiPipe = (PipeLogisticsChassi)pipe.pipe;
    IInventory _moduleInventory = _chassiPipe.getModuleInventory();
    DummyContainer dummy = new DummyContainer(player.inventory, _moduleInventory);
    if (_chassiPipe.getChassiSize() < 5){
View Full Code Here


  @SuppressWarnings("unchecked")
  public <T> T getLogisticsModule(EntityPlayer player, Class<T> clazz) {
    LogisticsModule module = null;
    if(this.type == ModulePositionType.IN_PIPE) {
      moduleBased = true;
      LogisticsTileGenericPipe pipe = this.getPipe(player.getEntityWorld());
      moduleBased = false;
      if(pipe == null || !(pipe.pipe instanceof CoreRoutedPipe)) {
        targetNotFound("Couldn't find " + clazz.getName() + ", pipe didn't exsist");
        return null;
      }
      module = ((CoreRoutedPipe)pipe.pipe).getLogisticsModule();
    } else if (this.type == ModulePositionType.IN_HAND) {
      if(MainProxy.isServer(player.getEntityWorld())) {
        if(player.openContainer instanceof DummyModuleContainer) {
          DummyModuleContainer dummy = (DummyModuleContainer) player.openContainer;
          module = dummy.getModule();
        } else {
          targetNotFound("Couldn't find " + clazz.getName() + ", container wasn't a DummyModule Container");
          return null;
        }
      } else {
        module = MainProxy.proxy.getModuleFromGui();
        if(module == null) {
          targetNotFound("Couldn't find " + clazz.getName() + ", GUI didn't provide the module");
          return null;
        }
      }
    } else {
      moduleBased = true;
      LogisticsTileGenericPipe pipe = this.getPipe(player.getEntityWorld());
      moduleBased = false;
      if(pipe == null || !(pipe.pipe instanceof CoreRoutedPipe)) {
        targetNotFound("Couldn't find " + clazz.getName() + ", pipe didn't exsist");
        return null;
      }
View Full Code Here

    return new ProviderPipeIncludePacket(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
    if (pipe == null) {
      return;
    }
    if (!(pipe.pipe instanceof PipeItemsProviderLogistics)) {
      return;
View Full Code Here

    super(id);
  }
 
  @Override
  public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe tile = this.getPipe(player.worldObj);
    if(tile == null) return;
    if(tile.pipe instanceof CoreRoutedPipe) {
      IRouter router = ((CoreRoutedPipe)tile.pipe).getRouter();

      //this is here to allow players to manually trigger a network-wide LSA update
View Full Code Here

  @Setter
  private List<Integer> types;
 
  @Override
  public void processPacket(EntityPlayer player) {
    LogisticsTileGenericPipe pipe = this.getPipe(player.getEntityWorld());
    if(pipe == null) return;
    ((CoreRoutedPipe)pipe.pipe).handleSignPacket(types);
  }
View Full Code Here

  }

  @Override
  public void processPacket(EntityPlayer player) {
    if(MainProxy.isClient(player.worldObj)) {
      final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
      if(pipe == null) {
        return;
      }
      if(pipe.pipe instanceof PipeItemsInvSysConnector) {
        PipeItemsInvSysConnector invCon = (PipeItemsInvSysConnector) pipe.pipe;
        invCon.resistance = getInteger();
      }
    } else {
      final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
      if(pipe == null) {
        return;
      }
      if(pipe.pipe instanceof PipeItemsInvSysConnector) {
        PipeItemsInvSysConnector invCon = (PipeItemsInvSysConnector) pipe.pipe;
View Full Code Here

    items.removeScheduledItems();
  }
 
  private boolean passToNextPipe(LPTravelingItem item, TileEntity tile) {
    if(tile instanceof LogisticsTileGenericPipe) {
      LogisticsTileGenericPipe pipe = (LogisticsTileGenericPipe)tile;
      if(LogisticsBlockGenericPipe.isValid(pipe.pipe) && pipe.pipe.transport instanceof PipeTransportLogistics) {
        ((PipeTransportLogistics)pipe.pipe.transport).injectItem(item, item.output);
        return true;
      }
    }
View Full Code Here

    return new StatUpdate(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
    if (pipe == null) {
      return;
    }
    if (!(pipe.pipe instanceof CoreRoutedPipe)) {
      return;
View Full Code Here

    positionInt = data.readInt();
  }
 
  @SuppressWarnings("unchecked")
  public <T> T getLogisticsModule(World world, Class<T> clazz) {
    LogisticsTileGenericPipe pipe = this.getPipe(world);
    if(pipe == null || !(pipe.pipe instanceof CoreRoutedPipe)) {
      if(LPConstants.DEBUG) {
        LogisticsPipes.log.fatal(this.toString());
        new RuntimeException("Couldn't find " + clazz.getName() + ", pipe didn't exsist").printStackTrace();
      }
View Full Code Here

    return new CrafterDefault(getId());
  }

  @Override
  public void processPacket(EntityPlayer player) {
    final LogisticsTileGenericPipe pipe = this.getPipe(player.worldObj);
    if (pipe == null) {
      return;
    }
    if(getInteger2() == -1) {
      if (!(pipe.pipe instanceof CoreRoutedPipe)) {
View Full Code Here

TOP

Related Classes of logisticspipes.pipes.basic.LogisticsTileGenericPipe

Copyright © 2018 www.massapicom. 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.