mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 03:07:34 +00:00
68 lines
1.6 KiB
Java
68 lines
1.6 KiB
Java
package noppes.npcs.scripted.interfaces;
|
|
|
|
import net.minecraft.tileentity.TileEntity;
|
|
import noppes.npcs.scripted.ScriptWorld;
|
|
|
|
public interface ITileEntity {
|
|
/**
|
|
*
|
|
* @return An integer representing the metadata of this block. Blocks with different states will
|
|
* return different values. For example, each stage of growth for a wheat crop will return a different value, each
|
|
* orientation of a stair block will return a different value, etc.
|
|
*/
|
|
int getBlockMetadata();
|
|
|
|
/**
|
|
*
|
|
* @return The world this tile entity is in.
|
|
*/
|
|
ScriptWorld getWorld();
|
|
|
|
/**
|
|
*
|
|
* @return An obfuscated MC tile entity object.
|
|
*/
|
|
TileEntity getMCTileEntity();
|
|
|
|
/**
|
|
* Reads an INbt compound tag, creates a tile entity based on the data, and replaces this entity with the new one.
|
|
*/
|
|
void readFromNBT(INbt nbt);
|
|
|
|
/**
|
|
* @return The distance of this tile entity from the point given by the x, y, and z parameters.
|
|
*/
|
|
double getDistanceFrom(double x, double y, double z);
|
|
|
|
/**
|
|
* @return A new IBlock object based on this tile entity's type.
|
|
*/
|
|
IBlock getBlockType();
|
|
|
|
/**
|
|
*
|
|
* @return True if the tile entity is invalid, false otherwise.
|
|
*/
|
|
boolean isInvalid();
|
|
|
|
/**
|
|
* Invalidates the tile entity.
|
|
*/
|
|
void invalidate();
|
|
|
|
/**
|
|
* Validates the tile entity for use.
|
|
*/
|
|
void validate();
|
|
|
|
/**
|
|
* Updates the block's tile entity to the values set in this object.
|
|
*/
|
|
void updateContainingBlockInfo();
|
|
|
|
/**
|
|
* Writes the tile entity to NBT and returns the compound tag.
|
|
*/
|
|
INbt getNBT();
|
|
}
|