Constructor | Description |
---|---|
BlockIterator(@NotNull LivingEntity entity) |
Constructs the BlockIterator.
|
BlockIterator(@NotNull LivingEntity entity,
int maxDistance) |
Constructs the BlockIterator.
|
BlockIterator(@NotNull Location loc) |
Constructs the BlockIterator.
|
BlockIterator(@NotNull Location loc,
double yOffset) |
Constructs the BlockIterator.
|
BlockIterator(@NotNull Location loc,
double yOffset,
int maxDistance) |
Constructs the BlockIterator.
|
BlockIterator(@NotNull World world,
@NotNull Vector start,
@NotNull Vector direction,
double yOffset,
int maxDistance) |
Constructs the BlockIterator.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
hasNext() |
Returns true if the iteration has more elements
|
@NotNull Block |
next() |
Returns the next Block in the trace
|
void |
remove() |
forEachRemaining
public BlockIterator(@NotNull @NotNull World world, @NotNull @NotNull Vector start, @NotNull @NotNull Vector direction, double yOffset, int maxDistance)
This considers all blocks as 1x1x1 in size.
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(@NotNull @NotNull Location loc, double yOffset, int maxDistance)
This considers all blocks as 1x1x1 in size.
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(@NotNull @NotNull Location loc, double yOffset)
This considers all blocks as 1x1x1 in size.
loc
- The location for the start of the ray traceyOffset
- The trace begins vertically offset from the start vector
by this valuepublic BlockIterator(@NotNull @NotNull Location loc)
This considers all blocks as 1x1x1 in size.
loc
- The location for the start of the ray tracepublic BlockIterator(@NotNull @NotNull LivingEntity entity, int maxDistance)
This considers all blocks as 1x1x1 in size.
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(@NotNull @NotNull LivingEntity entity)
This considers all blocks as 1x1x1 in size.
entity
- Information from the entity is used to set up the tracepublic boolean hasNext()
@NotNull public @NotNull Block next() throws NoSuchElementException
next
in interface Iterator<Block>
NoSuchElementException
Copyright © 2020. All rights reserved.