2010-12-26 23:22:15 +00:00
|
|
|
package org.bukkit;
|
|
|
|
|
2011-02-02 00:01:33 +01:00
|
|
|
import org.bukkit.block.Block;
|
2011-03-07 14:06:15 -05:00
|
|
|
import org.bukkit.block.BlockState;
|
|
|
|
import org.bukkit.entity.Entity;
|
2011-02-02 00:01:33 +01:00
|
|
|
|
2010-12-26 23:22:15 +00:00
|
|
|
/**
|
|
|
|
* Represents a chunk of blocks
|
|
|
|
*/
|
|
|
|
public interface Chunk {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the X-coordinate of this chunk
|
|
|
|
*
|
|
|
|
* @return X-coordinate
|
|
|
|
*/
|
|
|
|
int getX();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the Z-coordinate of this chunk
|
|
|
|
*
|
|
|
|
* @return Z-coordinate
|
|
|
|
*/
|
|
|
|
int getZ();
|
|
|
|
|
2011-01-04 14:08:29 +00:00
|
|
|
/**
|
|
|
|
* Gets the world containing this chunk
|
|
|
|
*
|
|
|
|
* @return Parent World
|
|
|
|
*/
|
|
|
|
World getWorld();
|
2011-02-02 00:01:33 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets a block from this chunk
|
2011-02-02 00:02:08 +01:00
|
|
|
*
|
2011-02-02 00:01:33 +01:00
|
|
|
* @param x 0-15
|
|
|
|
* @param y 0-127
|
|
|
|
* @param z 0-15
|
|
|
|
* @return the Block
|
|
|
|
*/
|
|
|
|
Block getBlock(int x, int y, int z);
|
2011-05-14 23:22:54 +02:00
|
|
|
|
2011-06-07 03:22:03 -04:00
|
|
|
/**
|
|
|
|
* Capture thread-safe read-only snapshot of chunk data
|
|
|
|
* @return ChunkSnapshot
|
|
|
|
*/
|
|
|
|
ChunkSnapshot getChunkSnapshot();
|
|
|
|
|
2011-03-07 14:06:15 -05:00
|
|
|
Entity[] getEntities();
|
2011-05-14 23:22:54 +02:00
|
|
|
|
2011-03-07 14:06:15 -05:00
|
|
|
BlockState[] getTileEntities();
|
2010-12-26 23:22:15 +00:00
|
|
|
}
|