This commit is contained in:
Kam committed 2025-03-13 15:36:30 -04:00
1 parent c81e848895
commit c7a74a3e0e
59 files changed
+506 -592

No files matched your search

+15 -1
View File
@@ -11,6 +11,7 @@ public interface IBlock {
int getZ();
/**
*
* @return An IPos object with the block's XYZ position.
*/
IPos getPosition();
@@ -18,7 +19,7 @@ public interface IBlock {
/**
* Moves the block to a new position in the given world. The old position is replaced with air.
*
* @param pos The new position of the block
* @param pos The new position of the block
* @param world The destination world of the block
* @return Whether the block was successfully placed
*/
@@ -31,6 +32,7 @@ public interface IBlock {
boolean setPosition(int x, int y, int z);
/**
*
* @return The block name as it appears in the block registry. Return example: "minecraft:stone"
*/
String getName();
@@ -43,53 +45,63 @@ public interface IBlock {
boolean isAir();
/**
*
* @param blockName The name of the block to be set in place of this block.
* @return The new block set in place of this block as an IBlock object.
*/
IBlock setBlock(String blockName);
/**
*
* @param block Input IBlock object to replace this block.
* @return The new block set in place of the previous block.
*/
IBlock setBlock(IBlock block);
/**
*
* @return True if the block can contain items like a chest does.
*/
boolean isContainer();
/**
*
* @return The container object of this block. If this block is not a container, an exception will be thrown.
*/
IContainer getContainer();
/**
*
* @return An IWorld object of the world this block is in.
*/
IWorld getWorld();
/**
*
* @return True if this block has a tile entity. Blocks with custom data like signs, player skulls, chests, etc. will have tile entities.
*/
boolean hasTileEntity();
/**
*
* @return An ITileEntity object which can modify this block's tile entity.
*/
ITileEntity getTileEntity();
/**
*
* @param tileEntity Replaces this block's tile entity based on the data given by this parameter.
*/
void setTileEntity(ITileEntity tileEntity);
/**
*
* @return An obfuscated MC object for the block's tile entity.
*/
TileEntity getMCTileEntity();
/**
*
* @return An obfuscated MC block object.
*/
Block getMCBlock();
@@ -97,11 +109,13 @@ public interface IBlock {
String getDisplayName();
/**
*
* @return An INbt object which can modify the block's tile entity's NBT data.
*/
INbt getTileEntityNBT();
/**
*
* @param maxVolume The volume threshold to determine whether this block's bounding box collides, if it has one.
* @return Whether this block can be collided with
*/