Package 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
Modifier and Type Method Description int
getHeight()
Gets the height of the world.int
getTypeId(int x, int y, int z)
Deprecated.Magic valueboolean
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)
Deprecated.Magic valueboolean
setRawTypeIdAndData(int x, int y, int z, int typeId, int data)
Deprecated.Magic valueboolean
setTypeId(int x, int y, int z, int typeId)
Deprecated.Magic valueboolean
setTypeIdAndData(int x, int y, int z, int typeId, int data)
Deprecated.Magic value
-
Method Details
-
setRawTypeId
@Deprecated boolean setRawTypeId(int x, int y, int z, int typeId)Deprecated.Magic valueSet 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 coordinatey
- Y coordinatez
- Z coordinatetypeId
- New block ID- Returns:
- true if the block was set successfully
-
setRawTypeIdAndData
@Deprecated boolean setRawTypeIdAndData(int x, int y, int z, int typeId, int data)Deprecated.Magic valueSet 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 coordinatey
- Y coordinatez
- Z coordinatetypeId
- New block IDdata
- Block data- Returns:
- true if the block was set successfully
-
setTypeId
@Deprecated boolean setTypeId(int x, int y, int z, int typeId)Deprecated.Magic valueSet a block type at the specified coordinates.This method cannot call World.setRawTypeId, a full update is needed.
- Parameters:
x
- X coordinatey
- Y coordinatez
- Z coordinatetypeId
- New block ID- Returns:
- true if the block was set successfully
-
setTypeIdAndData
@Deprecated boolean setTypeIdAndData(int x, int y, int z, int typeId, int data)Deprecated.Magic valueSet a block type and data at the specified coordinates.This method cannot call World.setRawTypeId, a full update is needed.
- Parameters:
x
- X coordinatey
- Y coordinatez
- Z coordinatetypeId
- New block IDdata
- Block data- Returns:
- true if the block was set successfully
-
getTypeId
@Deprecated int getTypeId(int x, int y, int z)Deprecated.Magic valueGet the block type at the location.- Parameters:
x
- X coordinatey
- Y coordinatez
- 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 coordinatey
- Y coordinatez
- Z coordinate- Returns:
- True if the block is considered empty.
-