org.bukkit
Interface BlockChangeDelegate


public interface BlockChangeDelegate

A delegate for handling block changes. This serves as a direct interface between generation algorithms in the server implementation and utilizing code.


Method Summary
 int getHeight()
          Gets the height of the world.
 int getTypeId(int x, int y, int z)
          Get the block type at the location.
 boolean isEmpty(int x, int y, int z)
          Checks if the specified block is empty (air) or not.
 boolean setRawTypeId(int x, int y, int z, int typeId)
          Set a block type at the specified coordinates without doing all world updates and notifications.
 boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data)
          Set a block type and data at the specified coordinates without doing all world updates and notifications.
 boolean setTypeId(int x, int y, int z, int typeId)
          Set a block type at the specified coordinates.
 boolean setTypeIdAndData(int x, int y, int z, int typeId, int data)
          Set a block type and data at the specified coordinates.
 

Method Detail

setRawTypeId

boolean setRawTypeId(int x,
                     int y,
                     int z,
                     int typeId)
Set a block type at the specified coordinates without doing all world updates and notifications. It is safe to have this call World.setTypeId, but it may be slower than World.setRawTypeId.

Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate
typeId - New block ID
Returns:
true if the block was set successfully

setRawTypeIdAndData

boolean setRawTypeIdAndData(int x,
                            int y,
                            int z,
                            int typeId,
                            int data)
Set a block type and data at the specified coordinates without doing all world updates and notifications. It is safe to have this call World.setTypeId, but it may be slower than World.setRawTypeId.

Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate
typeId - New block ID
data - Block data
Returns:
true if the block was set successfully

setTypeId

boolean setTypeId(int x,
                  int y,
                  int z,
                  int typeId)
Set a block type at the specified coordinates. This method cannot call World.setRawTypeId, a full update is needed.

Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate
typeId - New block ID
Returns:
true if the block was set successfully

setTypeIdAndData

boolean setTypeIdAndData(int x,
                         int y,
                         int z,
                         int typeId,
                         int data)
Set a block type and data at the specified coordinates. This method cannot call World.setRawTypeId, a full update is needed.

Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate
typeId - New block ID
data - Block data
Returns:
true if the block was set successfully

getTypeId

int getTypeId(int x,
              int y,
              int z)
Get the block type at the location.

Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate
Returns:
The block ID

getHeight

int getHeight()
Gets the height of the world.

Returns:
Height of the world

isEmpty

boolean isEmpty(int x,
                int y,
                int z)
Checks if the specified block is empty (air) or not.

Parameters:
x - X coordinate
y - Y coordinate
z - Z coordinate
Returns:
True if the block is considered empty.


Copyright © 2013. All Rights Reserved.