Class BlockIterator
java.lang.Object
net.minestom.server.utils.block.BlockIterator
-
Constructor Summary
ConstructorsConstructorDescriptionBlockIterator(Pos pos) Constructs the BlockIterator.BlockIterator(Pos pos, double yOffset) Constructs the BlockIterator.BlockIterator(Pos pos, double yOffset, int maxDistance) Constructs the BlockIterator.BlockIterator(Vec start, Vec direction, double yOffset, double maxDistance) Constructs the BlockIterator.BlockIterator(Vec start, Vec direction, double yOffset, double maxDistance, boolean smooth) Constructs the BlockIterator.BlockIterator(Entity entity) Constructs the BlockIterator.BlockIterator(Entity entity, int maxDistance) Constructs the BlockIterator. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterator
forEachRemaining
-
Constructor Details
-
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
start- A Vector giving the initial position 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 limitsmooth- A boolean indicating whether the cast should be smooth. Smooth casts will only include one block when intersecting multiple axis lines.
-
BlockIterator
public BlockIterator() -
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
start- A Vector giving the initial position 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 limit
-
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
pos- The position 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 limit
-
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
pos- The position for the start of the ray traceyOffset- The trace begins vertically offset from the start vector by this value
-
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
pos- The position for the start of the ray trace
-
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
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 limit
-
BlockIterator
Constructs the BlockIterator.This considers all blocks as 1x1x1 in size.
- Parameters:
entity- Information from the entity is used to set up the trace
-
-
Method Details
-
reset
-
hasNext
-
remove
-
next
-