Package ch.njol.skript.util

Examples of ch.njol.skript.util.AABB


          Iterator<Block> current = this.current;
          while ((current == null || !current.hasNext()) && cs.hasNext()) {
            final Chunk c = cs.next().asBukkitChunk();
            if (c == null)
              continue;
            current = new AABB(c).iterator();
          }
          this.current = current;
          return current != null && current.hasNext();
        }
       
View Full Code Here


    @Override
    public Iterator<Block> getBlocks() {
      final World w = Bukkit.getWorld(field.getWorld());
      if (w == null)
        return EmptyIterator.get();
      return new CheckedIterator<Block>(new AABB(w, new Vector(field.getMinx(), field.getMiny(), field.getMinz()), new Vector(field.getMaxx() + 1, field.getMaxy() + 1, field.getMaxz() + 1)).iterator(),
          new NullableChecker<Block>() {
            @Override
            public boolean check(final @Nullable Block b) {
              return b != null && field.envelops(b);
            }
View Full Code Here

      if (lower == null || upper == null || lower.getWorld() == null || upper.getWorld() == null || lower.getWorld() != upper.getWorld())
        return EmptyIterator.get();
      upper.setY(upper.getWorld().getMaxHeight());
      upper.setX(upper.getBlockX() + 1);
      upper.setZ(upper.getBlockZ() + 1);
      return new AABB(lower, upper).iterator();
    }
View Full Code Here

    }
   
    @Override
    public Iterator<Block> getBlocks() {
      final BlockVector min = region.getMinimumPoint(), max = region.getMaximumPoint();
      return new AABB(world, new Vector(min.getBlockX(), min.getBlockY(), min.getBlockZ()), new Vector(max.getBlockX() + 1, max.getBlockY() + 1, max.getBlockZ() + 1)).iterator();
//      final Iterator<BlockVector2D> iter = region.getPoints().iterator();
//      if (!iter.hasNext())
//        return EmptyIterator.get();
//      return new Iterator<Block>() {
//        @SuppressWarnings("null")
View Full Code Here

TOP

Related Classes of ch.njol.skript.util.AABB

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.