Package appeng.api.util

Examples of appeng.api.util.WorldCoord


  }

  @Override
  public void addInformation(ItemStack is, EntityPlayer player, List list, boolean adv)
  {
    WorldCoord wc = getStoredSize( is );
    if ( wc.x > 0 )
      list.add( GuiText.StoredSize.getLocal() + ": " + wc.x + " x " + wc.y + " x " + wc.z );
  }
View Full Code Here


      {
        int dim = c.getInteger( "StorageDim" );
        return WorldSettings.getInstance().getStoredSize( dim );
      }
      else
        return new WorldCoord( c.getInteger( "sizeX" ), c.getInteger( "sizeY" ), c.getInteger( "sizeZ" ) );
    }
    return new WorldCoord( 0, 0, 0 );
  }
View Full Code Here

    if ( w != null )
    {
      NBTTagCompound info = (NBTTagCompound) w.getWorldInfo().getAdditionalProperty( "storageCell" );
      if ( info != null )
      {
        return new WorldCoord( info.getInteger( "minX" ), info.getInteger( "minY" ), info.getInteger( "minZ" ) );
      }
    }
    return new WorldCoord( 0, 0, 0 );
  }
View Full Code Here

    if ( w != null )
    {
      NBTTagCompound info = (NBTTagCompound) w.getWorldInfo().getAdditionalProperty( "storageCell" );
      if ( info != null )
      {
        return new WorldCoord( info.getInteger( "maxX" ), info.getInteger( "maxY" ), info.getInteger( "maxZ" ) );
      }
    }
    return new WorldCoord( 0, 0, 0 );
  }
View Full Code Here

  }

  @Override
  public TransitionResult doSpatialTransition(ItemStack is, World w, WorldCoord min, WorldCoord max, boolean doTransition)
  {
    WorldCoord scale = getStoredSize( is );

    int targetX = max.x - min.x - 1;
    int targetY = max.y - min.y - 1;
    int targetZ = max.z - min.z - 1;
    int maxSize = getMaxStoredDim( is );
View Full Code Here

  public WorldCoord getStoredSize(int dim)
  {
    int x = get( "StorageCell" + dim, "scaleX", 0 ).getInt();
    int y = get( "StorageCell" + dim, "scaleY", 0 ).getInt();
    int z = get( "StorageCell" + dim, "scaleZ", 0 ).getInt();
    return new WorldCoord( x, y, z );
  }
View Full Code Here

    Block blk = world.getBlock( x, y, z );
    int meta = world.getBlockMetadata( x, y, z );

    int blocks = 0;
    List<WorldCoord> next = new LinkedList<WorldCoord>();
    next.add( new WorldCoord( x, y, z ) );

    while (blocks < 90000 && !next.isEmpty())
    {

      List<WorldCoord> c = next;
View Full Code Here

    return true;
  }

  private void check(World world, int i, int y, int z, List<WorldCoord> next)
  {
    next.add( new WorldCoord( i, y, z ) );
  }
View Full Code Here

    }
  }

  private void markForUpdate(int src_x, int src_y, int src_z)
  {
    updates.add( new WorldCoord( src_x, src_y, src_z ) );
    for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
      updates.add( new WorldCoord( src_x + d.offsetX, src_y + d.offsetY, src_z + d.offsetZ ) );
  }
View Full Code Here

      Iterator<IGridHost> i = cluster.getTiles();
      while (i.hasNext())
      {
        IGridHost h = i.next();
        if ( h == this )
          places.add( new WorldCoord( this ) );
        else
        {
          TileEntity te = (TileEntity) h;

          for (ForgeDirection d : ForgeDirection.VALID_DIRECTIONS)
          {
            WorldCoord wc = new WorldCoord( te );
            wc.add( d, 1 );
            if ( worldObj.isAirBlock( wc.x, wc.y, wc.z ) )
              places.add( wc );
          }

        }
      }

      Collections.shuffle( places );

      if ( places.isEmpty() )
        throw new RuntimeException( "No air or even the tile hat was destroyed?!?!" );

      for (IAEItemStack ais : inv.getAvailableItems( AEApi.instance().storage().createItemList() ))
      {
        ais = ais.copy();
        ais.setStackSize( ais.getItemStack().getMaxStackSize() );
        while (true)
        {
          IAEItemStack g = inv.extractItems( ais.copy(), Actionable.MODULATE, cluster.getActionSource() );
          if ( g == null )
            break;

          WorldCoord wc = places.poll();
          places.add( wc );

          Platform.spawnDrops( worldObj, wc.x, wc.y, wc.z, Arrays.asList( g.getItemStack() ) );
        }
View Full Code Here

TOP

Related Classes of appeng.api.util.WorldCoord

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.