Interface ITileEntity


  • public interface ITileEntity
    • Method Detail

      • getBlockMetadata

        int getBlockMetadata()
        Returns:
        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.
      • getWorld

        IWorld getWorld()
        Returns:
        The world this tile entity is in.
      • setWorld

        void setWorld​(IWorld world)
      • getMCTileEntity

        net.minecraft.tileentity.TileEntity getMCTileEntity()
        Returns:
        An obfuscated MC tile entity object.
      • markDirty

        void markDirty()
      • readFromNBT

        void readFromNBT​(INbt nbt)
        Reads an INbt compound tag, creates a tile entity based on the data, and replaces this entity with the new one.
      • getDistanceFrom

        double getDistanceFrom​(double x,
                               double y,
                               double z)
        Returns:
        The distance of this tile entity from the point given by the x, y, and z parameters.
      • getDistanceFrom

        double getDistanceFrom​(IPos pos)
      • getBlockType

        IBlock getBlockType()
        Returns:
        A new IBlock object based on this tile entity's type.
      • isInvalid

        boolean isInvalid()
        Returns:
        True if the tile entity is invalid, false otherwise.
      • invalidate

        void invalidate()
        Invalidates the tile entity.
      • validate

        void validate()
        Validates the tile entity for use.
      • updateContainingBlockInfo

        void updateContainingBlockInfo()
        Updates the block's tile entity to the values set in this object.
      • getNBT

        INbt getNBT()
        Writes the tile entity to NBT and returns the compound tag.