2021-10-12 02:57:32 -05:00
|
|
|
//
|
|
|
|
|
// Source code recreated from a .class file by IntelliJ IDEA
|
|
|
|
|
// (powered by Fernflower decompiler)
|
|
|
|
|
//
|
|
|
|
|
|
2021-10-18 06:33:39 -05:00
|
|
|
package noppes.npcs.scripted.interfaces;
|
2021-10-12 02:57:32 -05:00
|
|
|
|
|
|
|
|
import net.minecraft.block.Block;
|
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
|
|
|
|
|
|
|
|
public interface IBlock {
|
|
|
|
|
int getX();
|
|
|
|
|
|
|
|
|
|
int getY();
|
|
|
|
|
|
|
|
|
|
int getZ();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns an IPos object with the block's XYZ position.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
IPos getPos();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns the block name as it appears in the block registry. Return example: "minecraft:stone"
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
String getName();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
* Deletes the block, setting it to air.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
void remove();
|
|
|
|
|
|
|
|
|
|
boolean isAir();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param blockName The name of the block to be set in place of this block.
|
|
|
|
|
* @return Returns 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 Returns the new block set in place of the previous block.
|
|
|
|
|
*/
|
|
|
|
|
IBlock setBlock(IBlock block);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns true if the block can contain items like a chest does.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
boolean isContainer();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns the container object of this block. If this block is not a container, an exception will be thrown.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
IContainer getContainer();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns an IWorld object of the world this block is in.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
IWorld getWorld();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns true if this block has a tile entity. Blocks with custom data like signs, player skulls, chests, etc. will have tile entities.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
boolean hasTileEntity();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns 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 Returns a non-script, obfuscated MC object for the block's tile entity.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
TileEntity getMCTileEntity();
|
|
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns a non-script, obfuscated MC block object.
|
|
|
|
|
*/
|
2021-10-12 02:57:32 -05:00
|
|
|
Block getMCBlock();
|
|
|
|
|
|
|
|
|
|
String getDisplayName();
|
2022-05-11 16:31:14 -05:00
|
|
|
|
2022-05-17 05:24:57 -05:00
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @return Returns an INbt object which can modify the block's tile entity's NBT data.
|
|
|
|
|
*/
|
2022-05-11 16:31:14 -05:00
|
|
|
INbt getTileEntityNBT();
|
2021-10-12 02:57:32 -05:00
|
|
|
}
|