2011-01-30 13:54:03 -08: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.
|
|
|
|
*
|
|
|
|
* @author sk89q
|
|
|
|
*/
|
|
|
|
public interface BlockChangeDelegate {
|
|
|
|
/**
|
|
|
|
* Set a block type at the specified coordinates.
|
|
|
|
*
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param z
|
|
|
|
* @param typeId
|
|
|
|
* @return true if the block was set successfully
|
|
|
|
*/
|
2011-04-20 18:59:31 +02:00
|
|
|
public boolean setRawTypeId(int x, int y, int z, int typeId);
|
2011-01-30 13:54:03 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a block type and data at the specified coordinates.
|
|
|
|
*
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param z
|
|
|
|
* @param typeId
|
|
|
|
* @param data
|
|
|
|
* @return true if the block was set successfully
|
|
|
|
*/
|
2011-04-20 18:59:31 +02:00
|
|
|
public boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data);
|
2011-01-30 13:54:03 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the block type at the location.
|
|
|
|
* @param x
|
|
|
|
* @param y
|
|
|
|
* @param z
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
public int getTypeId(int x, int y, int z);
|
|
|
|
}
|