Options
All
  • Public
  • Public/Protected
  • All
Menu

Base Java abstract class for custom native block entities. In terms of TypeScript declarations it's just an interface to call particular block entity methods when needed, on block entity objects, obtained for example using BlockSource.getCustomBlockEntity method

since

4.0

Hierarchy

Index

Properties

container: ItemContainer

ItemContainer object for the type of the following BlockActor, or null if this BlockActor's network utilities weren't setup yet

since

4.0

networkData: SyncedNetworkData

SyncedNetworkData object for the type of the following BlockActor, or null if this BlockActor's network utilities weren't setup yet

since

4.0

networkEntity: NetworkEntity

NetworkEntity object for the type of the following BlockActor, or null if this BlockActor's network utilities weren't setup yet

since

4.0

networkEntityType: NetworkEntityType

NetworkEntityType object for the type of the following BlockActor, or null if this BlockActor's network utilities weren't setup yet

since

4.0

Methods

  • clone(): any
  • equals(param0: any): boolean
  • finalize(): void
  • getDimension(): number
  • getLife(): number
  • since

    4.0

    Returns number

    non-negative amount of ticks the following BlockActor exists in the world. After re-entering the level, this value is reset back to zero.

  • getPointer(): number
  • Returns number

    pointer to the native object wrapped by the following native interface object, represented by a signed 64-bit integer

  • getType(): number
  • hasWorld(): boolean
  • hashCode(): number
  • isClient(): boolean
  • since

    4.0

    Returns boolean

    whether the following BlockActor object refers to the client-side native copy of the block entity

  • isFinished(): boolean
  • isMovable(): boolean
  • isServer(): boolean
  • since

    4.0

    Returns boolean

    whether the following BlockActor object refers to the server-side native copy of the block entity

  • load(data: CompoundTag): void
  • Method called by Minecraft when entering the level and loading the following BlockActor.

    In your save method implementation you can store some additional data of the block entity to the compound tag given there, and then read it from the compound tag given in load method.

    since

    4.0

    Parameters

    • data: CompoundTag

    Returns void

  • notify(): void
  • notifyAll(): void
  • onChanged(): void
  • onChunkLoaded(): void
  • Method called by Minecraft when chunk containing the following BlockActor is being loaded.

    since

    4.0

    Returns void

  • onChunkUnloaded(): void
  • Method called by Minecraft when chunk containing the following BlockActor is being unloaded.

    since

    4.0

    Returns void

  • onMove(): void
  • onPlace(): void
  • onRemoved(): void
  • onUse(player: Player, side: number, vec: Vec3d): boolean
  • save(data: CompoundTag): boolean
  • Method called by Minecraft when leaving the level and unloading the following BlockActor.

    In your save method implementation you can store some additional data of the block entity to the compound tag given there, and then read it from the compound tag given in load method.

    since

    4.0

    Parameters

    • data: CompoundTag

    Returns boolean

  • tick(): void
  • Method called by Minecraft every tick (20 times a second)

    since

    4.0

    Returns void

  • toString(): string
  • triggerEvent(id: number, type: number): void
  • since

    4.0

    Parameters

    • id: number
    • type: number

    Returns void

  • Invokes native block entity position getter in order to update it for the following Java wrapper. Used mainly internally, for example when the BlockActor is moved by a piston etc.

    since

    4.0

    Returns BlockActor

    reference to itself to be used in sequential calls

  • wait(): void
  • wait(param0: number): void
  • wait(param0: number, param1: number): void

Generated using TypeDoc