|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.aranai.dungeonator.dungeonchunk.DungeonChunk
public class DungeonChunk
Stores and manipulates Dungeonator chunk information, including type, neighbors, and doorways.
| Field Summary | |
|---|---|
private org.bukkit.Chunk |
chunk
The handle for the chunk data |
private DungeonChunkDoorway[] |
doorways
Doorways |
private DungeonChunk[] |
neighbors
Neighboring chunks (NESW) |
private long |
seed
Random seed used for procedural chunks. |
private DungeonChunkType |
type
Chunk type |
private java.lang.String |
world
The world name. |
private int |
x
X coordinate for the chunk. |
private int |
z
Z coordinate for the chunk. |
| Constructor Summary | |
|---|---|
DungeonChunk()
Instantiates a new dungeon chunk. |
|
DungeonChunk(org.bukkit.Chunk chunk)
Instantiates a new dungeon chunk from an existing chunk |
|
DungeonChunk(DungeonChunkType type)
Instantiates a new dungeon chunk with a specified DungeonChunkType. |
|
DungeonChunk(DungeonChunkType type,
java.lang.String world,
int x,
int z,
org.bukkit.Chunk chunk)
|
|
| Method Summary | |
|---|---|
DungeonChunkDoorway |
getDoorway(byte direction)
Gets the doorway matching the specified direction. |
java.util.Vector<DungeonChunkDoorway> |
getDoorwaysOnSide(byte[] side)
Gets all of the doorways on the specified side. |
org.bukkit.Chunk |
getHandle()
Gets the handle for the DungeonChunk's chunk data. |
IDungeonChunk |
getNeighbor(byte direction)
Gets the neighboring chunk matching the specified direction. |
long |
getSeed()
Gets the seed. |
DungeonChunkType |
getType()
Gets the DungeonChunkType for the chunk. |
java.lang.String |
getWorld()
Gets the world name. |
int |
getX()
Gets the x coordinate for the chunk. |
int |
getZ()
Gets the z coordinate for the chunk. |
boolean |
hasDoorway(byte d)
Checks for a doorway matching the specified direction. |
boolean |
hasNeighbor(byte direction)
Checks for a neighboring chunk matching the specified direction. |
boolean |
isValidChunkDirection(byte direction)
Checks if the specified direction is a valid chunk direction (NESW) |
void |
setDoorway(DungeonChunkDoorway doorway)
Sets a doorway. |
void |
setHandle(org.bukkit.Chunk handle)
Sets the handle for the DungeonChunk's chunk data. |
void |
setNeighbor(byte direction,
IDungeonChunk neighbor)
Sets the neighboring chunk for the specified direction. |
void |
setSeed(long seed)
Sets the seed. |
void |
setType(DungeonChunkType type)
Sets the DungeonChunkType for the chunk. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.lang.String world
private int x
private int z
private org.bukkit.Chunk chunk
private long seed
private DungeonChunkType type
private DungeonChunk[] neighbors
private DungeonChunkDoorway[] doorways
| Constructor Detail |
|---|
public DungeonChunk()
public DungeonChunk(DungeonChunkType type)
type - the typepublic DungeonChunk(org.bukkit.Chunk chunk)
chunk - the chunk
public DungeonChunk(DungeonChunkType type,
java.lang.String world,
int x,
int z,
org.bukkit.Chunk chunk)
| Method Detail |
|---|
public java.lang.String getWorld()
IDungeonChunk
getWorld in interface IDungeonChunkpublic int getX()
IDungeonChunk
getX in interface IDungeonChunkpublic int getZ()
IDungeonChunk
getZ in interface IDungeonChunkpublic long getSeed()
IDungeonChunk
getSeed in interface IDungeonChunkpublic void setSeed(long seed)
IDungeonChunk
setSeed in interface IDungeonChunkseed - the new seedpublic DungeonChunkType getType()
IDungeonChunk
getType in interface IDungeonChunkpublic void setType(DungeonChunkType type)
IDungeonChunk
setType in interface IDungeonChunktype - the new typepublic boolean hasDoorway(byte d)
IDungeonChunk
hasDoorway in interface IDungeonChunkpublic DungeonChunkDoorway getDoorway(byte direction)
IDungeonChunk
getDoorway in interface IDungeonChunkdirection - the direction of the doorway to get
public java.util.Vector<DungeonChunkDoorway> getDoorwaysOnSide(byte[] side)
IDungeonChunk
getDoorwaysOnSide in interface IDungeonChunkpublic void setDoorway(DungeonChunkDoorway doorway)
IDungeonChunk
setDoorway in interface IDungeonChunkdoorway - the DungeonChunkDoorway to setpublic boolean hasNeighbor(byte direction)
IDungeonChunk
hasNeighbor in interface IDungeonChunkpublic IDungeonChunk getNeighbor(byte direction)
IDungeonChunk
getNeighbor in interface IDungeonChunkdirection - the direction of the chunk to get
public void setNeighbor(byte direction,
IDungeonChunk neighbor)
IDungeonChunk
setNeighbor in interface IDungeonChunkdirection - the direction of the neighbor to setneighbor - the chunk to set as a neighborpublic org.bukkit.Chunk getHandle()
IDungeonChunk
getHandle in interface IDungeonChunkpublic void setHandle(org.bukkit.Chunk handle)
IDungeonChunk
setHandle in interface IDungeonChunkpublic boolean isValidChunkDirection(byte direction)
direction - the direction to check
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||