Class RegionIterator

java.lang.Object
org.cyclops.evilcraft.core.algorithm.RegionIterator
All Implemented Interfaces:
Iterator<net.minecraft.core.BlockPos>

public class RegionIterator extends Object implements Iterator<net.minecraft.core.BlockPos>
An iterator for an N-dimensional region defined by a location in that space with an offset in each direction.
  • Constructor Details

    • RegionIterator

      public RegionIterator(net.minecraft.core.BlockPos center, int offset, boolean shuffle)
      Make a new instance.
      Parameters:
      center - The center.
      offset - The offset.
      shuffle - If the resulting locations from the iterator should deterministicly be shuffled.
    • RegionIterator

      public RegionIterator(net.minecraft.core.BlockPos center, int offset)
      Make a new instance without shuffling the locations.
      Parameters:
      center - The center.
      offset - The offset.
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<net.minecraft.core.BlockPos>
    • next

      public net.minecraft.core.BlockPos next()
      Specified by:
      next in interface Iterator<net.minecraft.core.BlockPos>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<net.minecraft.core.BlockPos>