Examples of WorldCoord


Examples of appeng.api.util.WorldCoord

  }

  @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

Examples of appeng.api.util.WorldCoord

  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

Examples of appeng.api.util.WorldCoord

    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

Examples of appeng.api.util.WorldCoord

    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

Examples of appeng.api.util.WorldCoord

    }
  }

  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

Examples of appeng.api.util.WorldCoord

      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

Examples of appeng.api.util.WorldCoord

      return;

    ItemStack notAdded = sia.addItems( output );
    if ( notAdded != null )
    {
      WorldCoord wc = new WorldCoord( xCoord, yCoord, zCoord );

      wc.add( getForward(), 1 );

      List<ItemStack> out = new ArrayList<ItemStack>();
      out.add( notAdded );

      Platform.spawnDrops( worldObj, wc.x, wc.y, wc.z, out );
View Full Code Here

Examples of appeng.api.util.WorldCoord

    if ( Platform.isClient() )
      return;

    try
    {
      WorldCoord min = loc.copy();
      WorldCoord max = loc.copy();

      // find size of MB structure...
      while (isValidTileAt( world, min.x - 1, min.y, min.z ))
        min.x--;
      while (isValidTileAt( world, min.x, min.y - 1, min.z ))
View Full Code Here

Examples of com.palmergames.bukkit.towny.object.WorldCoord

        }
        if (r > 1000) r = 1000;
        for (int z = - r; z <= r; z++)
          for (int x = - r; x <= r; x++)
            if (out.size() < available)
            out.add(new WorldCoord(pos.getWorld(), pos.getX()+x, pos.getZ()+z));
      } else {
        throw new TownyException(TownySettings.getLangString("msg_err_invalid_radius"));
      }
    }
View Full Code Here

Examples of com.palmergames.bukkit.towny.object.WorldCoord

        }
        if (r > 1000) r = 1000;
        for (int z = -r; z <= r; z++)
          for (int x = -r; x <= r; x++)
            if ((x*x+z*z <= r*r) && (out.size() < available))
              out.add(new WorldCoord(pos.getWorld(), pos.getX()+x, pos.getZ()+z));
      } else {
        throw new TownyException(TownySettings.getLangString("msg_err_invalid_radius"));
      }
    }

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.