mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
102
paper-api/src/main/java/org/bukkit/Block.java
Normal file
102
paper-api/src/main/java/org/bukkit/Block.java
Normal file
@@ -0,0 +1,102 @@
|
||||
|
||||
package org.bukkit;
|
||||
|
||||
/**
|
||||
* Represents a block
|
||||
*/
|
||||
public interface Block {
|
||||
/**
|
||||
* Gets the metadata for this block
|
||||
*
|
||||
* @return block specific metadata
|
||||
*/
|
||||
byte getData();
|
||||
|
||||
/**
|
||||
* Gets the block at the given face
|
||||
*
|
||||
* @param face Face of this block to return
|
||||
* @return Block at the given face
|
||||
*/
|
||||
Block getFace(BlockFace face);
|
||||
|
||||
/**
|
||||
* Gets the block at the given offsets
|
||||
*
|
||||
* @param modX X-coordinate offset
|
||||
* @param modY Y-coordinate offset
|
||||
* @param modZ Z-coordinate offset
|
||||
* @return Block at the given offsets
|
||||
*/
|
||||
Block getRelative(int modX, int modY, int modZ);
|
||||
|
||||
/**
|
||||
* Gets the type of this block
|
||||
*
|
||||
* @return block type
|
||||
*/
|
||||
Material getType();
|
||||
|
||||
/**
|
||||
* Gets the type-ID of this block
|
||||
*
|
||||
* @return block type-ID
|
||||
*/
|
||||
int getTypeID();
|
||||
|
||||
/**
|
||||
* Gets the world which contains this Block
|
||||
*
|
||||
* @return World containing this block
|
||||
*/
|
||||
World getWorld();
|
||||
|
||||
/**
|
||||
* Gets the x-coordinate of this block
|
||||
*
|
||||
* @return x-coordinate
|
||||
*/
|
||||
int getX();
|
||||
|
||||
/**
|
||||
* Gets the y-coordinate of this block
|
||||
*
|
||||
* @return y-coordinate
|
||||
*/
|
||||
int getY();
|
||||
|
||||
/**
|
||||
* Gets the z-coordinate of this block
|
||||
*
|
||||
* @return z-coordinate
|
||||
*/
|
||||
int getZ();
|
||||
|
||||
/**
|
||||
* Gets the chunk which contains this block
|
||||
*
|
||||
* @return Containing Chunk
|
||||
*/
|
||||
Chunk getChunk();
|
||||
|
||||
/**
|
||||
* Sets the metadata for this block
|
||||
*
|
||||
* @param data New block specific metadata
|
||||
*/
|
||||
void setData(byte data);
|
||||
|
||||
/**
|
||||
* Sets the type of this block
|
||||
*
|
||||
* @param type Material to change this block to
|
||||
*/
|
||||
void setType(Material type);
|
||||
|
||||
/**
|
||||
* Sets the type-ID of this block
|
||||
*
|
||||
* @param type Type-ID to change this block to
|
||||
*/
|
||||
void setTypeID(int type);
|
||||
}
|
Reference in New Issue
Block a user