com.aranai.dungeonator.dungeonchunk
Interface IDungeonChunk

All Known Implementing Classes:
DungeonChunk

public interface IDungeonChunk

Specifies required methods for all dungeon chunk classes


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 direction)
          Checks for a doorway matching the specified direction.
 boolean hasNeighbor(byte direction)
          Checks for a neighboring chunk matching the specified direction.
 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.
 

Method Detail

getWorld

java.lang.String getWorld()
Gets the world name.

Returns:
the world name

getX

int getX()
Gets the x coordinate for the chunk.

Returns:
the x coordinate for the chunk

getZ

int getZ()
Gets the z coordinate for the chunk.

Returns:
the z coordinate for the chunk

getSeed

long getSeed()
Gets the seed.

Returns:
the seed

setSeed

void setSeed(long seed)
Sets the seed.

Parameters:
seed - the new seed

getType

DungeonChunkType getType()
Gets the DungeonChunkType for the chunk.

Returns:
the type

setType

void setType(DungeonChunkType type)
Sets the DungeonChunkType for the chunk.

Parameters:
type - the new type

hasDoorway

boolean hasDoorway(byte direction)
Checks for a doorway matching the specified direction.

Parameters:
d - the doorway direction to check
Returns:
true, if the chunk has a matching doorway

getDoorway

DungeonChunkDoorway getDoorway(byte direction)
Gets the doorway matching the specified direction.

Parameters:
direction - the direction of the doorway to get
Returns:
the doorway, or null if no doorway exists at the specified direction

getDoorwaysOnSide

java.util.Vector<DungeonChunkDoorway> getDoorwaysOnSide(byte[] side)
Gets all of the doorways on the specified side.

Parameters:
direction - the direction of the side to get
Returns:
the doorways on the specified side

setDoorway

void setDoorway(DungeonChunkDoorway doorway)
Sets a doorway. The direction will be inferred from the doorway instance itself.

Parameters:
doorway - the DungeonChunkDoorway to set

hasNeighbor

boolean hasNeighbor(byte direction)
Checks for a neighboring chunk matching the specified direction.

Parameters:
d - the neighbor direction to check
Returns:
true, if the chunk has a matching neighbor

getNeighbor

IDungeonChunk getNeighbor(byte direction)
Gets the neighboring chunk matching the specified direction.

Parameters:
direction - the direction of the chunk to get
Returns:
the neighboring chunk, or null if no neighbor exists at the specified direction

setNeighbor

void setNeighbor(byte direction,
                 IDungeonChunk neighbor)
Sets the neighboring chunk for the specified direction.

Parameters:
direction - the direction of the neighbor to set
neighbor - the chunk to set as a neighbor

getHandle

org.bukkit.Chunk getHandle()
Gets the handle for the DungeonChunk's chunk data.

Returns:
the chunk

setHandle

void setHandle(org.bukkit.Chunk handle)
Sets the handle for the DungeonChunk's chunk data.