public class TrackMovingPoint
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
org.bukkit.block.Block |
current |
org.bukkit.block.BlockFace |
currentDirection |
RailType |
currentRail |
org.bukkit.block.Block |
currentTrack |
org.bukkit.block.Block |
next |
org.bukkit.block.BlockFace |
nextDirection |
RailType |
nextRail |
org.bukkit.block.Block |
nextTrack |
Constructor and Description |
---|
TrackMovingPoint(org.bukkit.block.Block startBlock,
org.bukkit.block.BlockFace startDirection)
Deprecated.
|
TrackMovingPoint(org.bukkit.Location startPos,
org.bukkit.util.Vector motionVector)
Constructs a new Track Moving Point using the initial Minecart position
and initial motion vector direction specified
|
TrackMovingPoint(RailState state)
Constructs a new Track Moving Point using the initial rail state to start
iterating from
|
Modifier and Type | Method and Description |
---|---|
void |
clearNext()
Clears the next track information.
|
RailState |
getState() |
boolean |
hasNext()
Whether next track information is available
|
void |
next()
Loads in the next track information.
|
void |
next(boolean allowNext)
Loads in the next track information.
|
void |
setLoopFilter(boolean enabled)
Sets whether a loop filter is employed, which tracks the positions already returned
and stops iteration when encountering a block already visited.
|
public org.bukkit.block.Block current
public org.bukkit.block.Block next
public org.bukkit.block.Block currentTrack
public org.bukkit.block.Block nextTrack
public org.bukkit.block.BlockFace currentDirection
public org.bukkit.block.BlockFace nextDirection
public RailType currentRail
public RailType nextRail
public TrackMovingPoint(org.bukkit.Location startPos, org.bukkit.util.Vector motionVector)
startPos
- of the MinecartmotionVector
- to start moving intopublic TrackMovingPoint(RailState state)
state
- @Deprecated public TrackMovingPoint(org.bukkit.block.Block startBlock, org.bukkit.block.BlockFace startDirection)
startBlock
- of the rail to start moving fromstartDirection
- to start moving intopublic void setLoopFilter(boolean enabled)
enabled
- public boolean hasNext()
public void clearNext()
public void next()
hasNext()
to check whether next track information is available.public void next(boolean allowNext)
hasNext()
to check whether next track information is available.allowNext
- - True to allow future next() calls, False to make this one the lastpublic RailState getState()