Package ch.njol.skript.util
Class BlockLineIterator
java.lang.Object
ch.njol.skript.util.BlockLineIterator
- All Implemented Interfaces:
Iterator<org.bukkit.block.Block>
Iterates through blocks in a straight line from a start to end location (inclusive).
Given start and end locations are always cloned but may not be block-centered. Iterates through all blocks the line passes through in order from start to end location.
-
Constructor Summary
ConstructorsConstructorDescriptionBlockLineIterator
(@NotNull org.bukkit.Location start, @NotNull org.bukkit.Location end) BlockLineIterator
(@NotNull org.bukkit.block.Block start, @NotNull org.bukkit.block.Block end) BlockLineIterator
(@NotNull org.bukkit.block.Block start, org.bukkit.util.Vector direction, double distance) BlockLineIterator
(org.bukkit.Location start, @NotNull org.bukkit.util.Vector direction, double distance) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
BlockLineIterator
public BlockLineIterator(@NotNull @NotNull org.bukkit.Location start, @NotNull @NotNull org.bukkit.Location end) - Parameters:
start
- start locationend
- end location
-
BlockLineIterator
public BlockLineIterator(@NotNull @NotNull org.bukkit.block.Block start, @NotNull @NotNull org.bukkit.block.Block end) - Parameters:
start
- first blockend
- last block
-
BlockLineIterator
public BlockLineIterator(org.bukkit.Location start, @NotNull @NotNull org.bukkit.util.Vector direction, double distance) - Parameters:
start
- start locationdirection
- direction to travel indistance
- maximum distance to travel
-
BlockLineIterator
public BlockLineIterator(@NotNull @NotNull org.bukkit.block.Block start, org.bukkit.util.Vector direction, double distance) - Parameters:
start
- first blockdirection
- direction to travel indistance
- maximum distance to travel
-
-
Method Details