Перейти к основному содержанию

NativeTileEntity

Interface providing access to native tile entities such as chests, hoppers, furnaces, smelters, etc. See full list of supported native tile entities in the ETileEntityType enum.

Index

Methods

getCompoundTag

  • @since

    2.0.5b44


    Returns CompoundTag

    CompoundTag associated with specified native tile entity.

getSize

  • getSize(): number

  • Returns number

    Slots count for the specified NativeTileEntity.

getSlot


  • Parameters

    • slot: number

      slot number

    Returns ItemInstance

    Item instance in the specified slot of item TE.

getType

  • getType(): number

  • Returns number

    NativeTileEntity type constant, one of the ETileEntityType constants.

setCompoundTag

  • Sets compound tag for the specified tile entity.

    @since

    2.0.5b44


    Parameters

    Returns void

setSlot

  • setSlot(slot: number, id: number, count: number, data: number, extra?: ItemExtraData): void
  • setSlot(slot: number, item: ItemInstance): void
  • Sets the contents of a native tile entity's slot.


    Parameters

    • slot: number

      slot number

    • id: number

      item ID

    • count: number

      item count

    • data: number

      item data

    • optionalextra: ItemExtraData

      item extra data

    Returns void