Package logisticspipes.utils.tuples

Examples of logisticspipes.utils.tuples.LPPosition.moveForward()


  @Override
  public List<TileEntity> getConnections(TileEntity tile) {
    boolean onlyOnePipe = false;
    for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
      LPPosition p = new LPPosition(tile);
      p.moveForward(direction);
      TileEntity canidate = p.getTileEntity(tile.getWorldObj());
      if(canidate instanceof LogisticsTileGenericPipe && MainProxy.checkPipesConnections(tile, canidate, direction)) {
        if(onlyOnePipe) {
          onlyOnePipe = false;
          break;
View Full Code Here


    for(TileEntity connected:connections) {
      if(!SimpleServiceLocator.enderIOProxy.isSendAndReceive(connected)) continue;
      LogisticsTileGenericPipe pipe = null;
      for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
        LPPosition p = new LPPosition(connected);
        p.moveForward(direction);
        TileEntity canidate = p.getTileEntity(tile.getWorldObj());
        if(canidate instanceof LogisticsTileGenericPipe && MainProxy.checkPipesConnections(connected, canidate, direction)) {
          if(pipe != null) {
            pipe = null;
            break;
View Full Code Here

  @Override
  public List<TileEntity> getConnections(TileEntity tile) {
    boolean onlyOnePipe = false;
    for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
      LPPosition p = new LPPosition(tile);
      p.moveForward(direction);
      TileEntity canidate = p.getTileEntity(tile.getWorldObj());
      if(canidate instanceof LogisticsTileGenericPipe && MainProxy.checkPipesConnections(tile, canidate, direction)) {
        if(onlyOnePipe) {
          onlyOnePipe = false;
          break;
View Full Code Here

    List<TileEntity> list = new ArrayList<TileEntity>();
    for(TileEntity connected:connections) {
      LogisticsTileGenericPipe pipe = null;
      for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
        LPPosition p = new LPPosition(connected);
        p.moveForward(direction);
        TileEntity canidate = p.getTileEntity(tile.getWorldObj());
        if(canidate instanceof LogisticsTileGenericPipe && MainProxy.checkPipesConnections(connected, canidate, direction)) {
          if(pipe != null) {
            pipe = null;
            break;
View Full Code Here

      float fPos = item.getPosition() + item.getSpeed() * f;
     
      if(fPos < 0.5) {
        if(item.input == ForgeDirection.UNKNOWN) continue;
        if(!pipe.container.renderState.pipeConnectionMatrix.isConnected(item.input.getOpposite())) continue;
        pos.moveForward(item.input.getOpposite(), 0.5F - fPos);
      } else {
        if(item.output == ForgeDirection.UNKNOWN) continue;
        if(!pipe.container.renderState.pipeConnectionMatrix.isConnected(item.output)) continue;
        pos.moveForward(item.output, fPos - 0.5F);
      }
View Full Code Here

        if(!pipe.container.renderState.pipeConnectionMatrix.isConnected(item.input.getOpposite())) continue;
        pos.moveForward(item.input.getOpposite(), 0.5F - fPos);
      } else {
        if(item.output == ForgeDirection.UNKNOWN) continue;
        if(!pipe.container.renderState.pipeConnectionMatrix.isConnected(item.output)) continue;
        pos.moveForward(item.output, fPos - 0.5F);
      }
     
      if(item == null || item.getItemIdentifierStack() == null) continue;
      if(item.getContainer().xCoord != pipe.container.xCoord || item.getContainer().yCoord != pipe.container.yCoord || item.getContainer().zCoord != pipe.container.zCoord) continue;
      ItemStack itemstack = item.getItemIdentifierStack().makeNormalStack();
View Full Code Here

      count++;
    }
    count = 0;
    float dist = 0.135F;
    LPPosition pos = new LPPosition(0.5D, 0.5D, 0.5D);
    pos.moveForward(ForgeDirection.SOUTH, dist);
    pos.moveForward(ForgeDirection.EAST, dist);
    pos.moveForward(ForgeDirection.UP, dist);
    for(Pair<ItemIdentifierStack, Pair<Integer, Integer>> item: pipe.transport._itemBuffer) {
      if(item == null || item.getValue1() == null) continue;
      ItemStack itemstack = item.getValue1().makeNormalStack();
View Full Code Here

    }
    count = 0;
    float dist = 0.135F;
    LPPosition pos = new LPPosition(0.5D, 0.5D, 0.5D);
    pos.moveForward(ForgeDirection.SOUTH, dist);
    pos.moveForward(ForgeDirection.EAST, dist);
    pos.moveForward(ForgeDirection.UP, dist);
    for(Pair<ItemIdentifierStack, Pair<Integer, Integer>> item: pipe.transport._itemBuffer) {
      if(item == null || item.getValue1() == null) continue;
      ItemStack itemstack = item.getValue1().makeNormalStack();
      doRenderItem(itemstack, x + pos.getXD(), y + pos.getYD(), z + pos.getZD(), light, 0, 0, 0.25F);
View Full Code Here

    count = 0;
    float dist = 0.135F;
    LPPosition pos = new LPPosition(0.5D, 0.5D, 0.5D);
    pos.moveForward(ForgeDirection.SOUTH, dist);
    pos.moveForward(ForgeDirection.EAST, dist);
    pos.moveForward(ForgeDirection.UP, dist);
    for(Pair<ItemIdentifierStack, Pair<Integer, Integer>> item: pipe.transport._itemBuffer) {
      if(item == null || item.getValue1() == null) continue;
      ItemStack itemstack = item.getValue1().makeNormalStack();
      doRenderItem(itemstack, x + pos.getXD(), y + pos.getYD(), z + pos.getZD(), light, 0, 0, 0.25F);
      count++;
View Full Code Here

      doRenderItem(itemstack, x + pos.getXD(), y + pos.getYD(), z + pos.getZD(), light, 0, 0, 0.25F);
      count++;
      if(count >= 27) {
        break;
      } else if(count % 9 == 0) {
        pos.moveForward(ForgeDirection.SOUTH, dist * 2);
        pos.moveForward(ForgeDirection.EAST, dist * 2);
        pos.moveForward(ForgeDirection.DOWN, dist);       
      } else if(count % 3 == 0) {
        pos.moveForward(ForgeDirection.SOUTH, dist * 2);
        pos.moveForward(ForgeDirection.WEST, dist);
View Full Code Here

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.