public class SpiralIterator
Class SpiralIterator. Provides spiraliterator functionality for the Hytale server.
java.lang.Object > SpiralIterator
Field Summary
setup
private
boolean
setup
Field setup.
chunkX
private
int
chunkX
Field chunkX.
chunkZ
private
int
chunkZ
Field chunkZ.
maxI
private
long
maxI
Field maxI.
i
private
long
i
Field i.
x
private
int
x
Field x.
z
private
int
z
Field z.
dx
private
int
dx
Field dx.
dz
private
int
dz
Field dz.
widthTo
final
long
widthTo
Field widthTo.
widthFrom
final
long
widthFrom
Field widthFrom.
pos
final
long
pos
Field pos.
n
final
int
n
Field n.
chunkCoordinates
final
long
chunkCoordinates
Field chunkCoordinates.
tempDx
final
int
tempDx
Field tempDx.
k
final
int
k
Field k.
t
final
int
t
Field t.
m2
final
int
m2
Field m2.
m3
final
int
m3
Field m3.
Method Detail
SpiralIterator
public
public
SpiralIterator
()
Method SpiralIterator.
init
public
void
init
(final int chunkX, final int chunkZ, final int radiusTo)
Method init.
- Parameters:
final intchunkXfinal intchunkZfinal intradiusTo
reset
public
void
reset
()
Method reset.
next
public
long
next
()
Method next.
hasNext
public
boolean
hasNext
()
Method hasNext.
isSetup
public
boolean
isSetup
()
Method isSetup.
getIndex
public
long
getIndex
()
Method getIndex.
getMaxIndex
public
long
getMaxIndex
()
Method getMaxIndex.
getChunkX
public
int
getChunkX
()
Method getChunkX.
getChunkZ
public
int
getChunkZ
()
Method getChunkZ.
getX
public
int
getX
()
Method getX.
getZ
public
int
getZ
()
Method getZ.
getDx
public
int
getDx
()
Method getDx.
getDz
public
int
getDz
()
Method getDz.
getCurrentRadius
public
int
getCurrentRadius
()
Method getCurrentRadius.
getCompletedRadius
public
int
getCompletedRadius
()
Method getCompletedRadius.
getPosFromIndex
static
long
getPosFromIndex
(int index)
Method getPosFromIndex.
- Parameters:
intindex