|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bukkit.util.BlockIterator
public class BlockIterator
This class performs ray tracing and iterates along blocks on a line
Constructor Summary | |
---|---|
BlockIterator(LivingEntity entity)
Constructs the BlockIterator. |
|
BlockIterator(LivingEntity entity,
int maxDistance)
Constructs the BlockIterator. |
|
BlockIterator(Location loc)
Constructs the BlockIterator. |
|
BlockIterator(Location loc,
double yOffset)
Constructs the BlockIterator. |
|
BlockIterator(Location loc,
double yOffset,
int maxDistance)
Constructs the BlockIterator |
|
BlockIterator(World world,
Vector start,
Vector direction,
double yOffset,
int maxDistance)
Constructs the BlockIterator |
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if the iteration has more elements |
Block |
next()
Returns the next Block in the trace |
void |
remove()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BlockIterator(World world, Vector start, Vector direction, double yOffset, int maxDistance)
world
- The world to use for tracingstart
- A Vector giving the initial location for the tracedirection
- A Vector pointing in the direction for the traceyOffset
- The trace begins vertically offset from the start vector by this valuemaxDistance
- This is the maximum distance in blocks for the trace. Setting this value above 140 may lead to problems with unloaded chunks. A value of 0 indicates no limitpublic BlockIterator(Location loc, double yOffset, int maxDistance)
loc
- The location for the start of the ray traceyOffset
- The trace begins vertically offset from the start vector by this valuemaxDistance
- This is the maximum distance in blocks for the trace. Setting this value above 140 may lead to problems with unloaded chunks. A value of 0 indicates no limitpublic BlockIterator(Location loc, double yOffset)
loc
- The location for the start of the ray traceyOffset
- The trace begins vertically offset from the start vector by this valuepublic BlockIterator(Location loc)
loc
- The location for the start of the ray tracepublic BlockIterator(LivingEntity entity, int maxDistance)
entity
- Information from the entity is used to set up the tracemaxDistance
- This is the maximum distance in blocks for the trace. Setting this value above 140 may lead to problems with unloaded chunks. A value of 0 indicates no limitpublic BlockIterator(LivingEntity entity)
entity
- Information from the entity is used to set up the traceMethod Detail |
---|
public boolean hasNext()
hasNext
in interface Iterator<Block>
public Block next()
next
in interface Iterator<Block>
public void remove()
remove
in interface Iterator<Block>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |