2011-04-21 15:27:18 +01:00
|
|
|
package org.bukkit;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* A delegate for handling block changes. This serves as a direct interface
|
|
|
|
* between generation algorithms in the server implementation and utilizing
|
|
|
|
* code.
|
2011-05-14 23:22:54 +02:00
|
|
|
*
|
2011-04-21 15:27:18 +01:00
|
|
|
* @author sk89q
|
|
|
|
*/
|
|
|
|
public interface BlockChangeDelegate {
|
2011-05-14 23:22:54 +02:00
|
|
|
|
2011-04-21 15:27:18 +01:00
|
|
|
/**
|
|
|
|
* Set a block type at the specified coordinates.
|
2011-05-14 23:22:54 +02:00
|
|
|
*
|
2011-04-21 15:27:18 +01:00
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param z
|
|
|
|
* @param typeId
|
|
|
|
* @return true if the block was set successfully
|
|
|
|
*/
|
|
|
|
public boolean setRawTypeId(int x, int y, int z, int typeId);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a block type and data at the specified coordinates.
|
2011-05-14 23:22:54 +02:00
|
|
|
*
|
2011-04-21 15:27:18 +01:00
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param z
|
|
|
|
* @param typeId
|
|
|
|
* @param data
|
|
|
|
* @return true if the block was set successfully
|
|
|
|
*/
|
|
|
|
public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);
|
2011-05-14 23:22:54 +02:00
|
|
|
|
2011-04-21 15:27:18 +01:00
|
|
|
/**
|
|
|
|
* Get the block type at the location.
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param z
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public int getTypeId(int x, int y, int z);
|
2011-09-23 17:15:23 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the height of the world.
|
|
|
|
*
|
|
|
|
* @return Height of the world
|
|
|
|
*/
|
|
|
|
public int getHeight();
|
2011-04-21 15:27:18 +01:00
|
|
|
}
|