Interface CommandBlockEntity

CommandBlock (Command Block) with ID = 26.

interface CommandBlockEntity {
    auto: number;
    Command: string;
    conditionMet: boolean;
    CustomName: string;
    ExecuteOnFirstTick: boolean;
    id: "CommandBlock";
    isMovable: boolean;
    LastExecution: number;
    LastOutput: string;
    LastOutputParams: string[];
    LPCommandMode: number;
    LPConditionalMode: number;
    LPRedstoneMode: number;
    powered: boolean;
    SuccessCount: number;
    TickDelay: number;
    TrackOutput: boolean;
    Version: number;
    x: number;
    y: number;
    z: number;
}

Hierarchy (view full)

Properties

auto: number
Command: string

Command to be executed here, such as /playanimation \@e[type=!minecraft:player] animation.humanoid.celebrating null 20.

conditionMet: boolean

Condition right now is true?

CustomName: string

Like nametag, but above command block; hovering text.

ExecuteOnFirstTick: boolean

When LPCommandMode is set to cycled and conditions are done, first command executes without TickDelay.

id

Typed identifier, such as "Chest", "Beacon", etc.

isMovable: boolean

Block Entity will be saved without instantiating new one when transporting (via pistons, commands, etc.).

LastExecution: number

When last execution has been performed.

LastOutput: string

Message recorded with last execution, requires TrackOutput to be set to true.

LastOutputParams: string[]

Splitted to command parts without first slash (or symbol if slash is not provided), requires TrackOutput to be set to true.

LPCommandMode: number

0 means impulse (single activation), 1 chain (activation when pointed to chain command block executed) and 2 cycled (forever execution between delay with condition checking).

LPConditionalMode: number

0 means statement, 1 doesn't care about result.

LPRedstoneMode: number

0 means always active, 1 requires redstone.

powered: boolean

Redstone signal found?

SuccessCount: number
TickDelay: number

Delay in ticks between executions (cycled blocks) or before starting it.

TrackOutput: boolean

Save last execution command results.

Version: number

Database tracking identifier (in 1.16 equals 13).

x: number
y: number
z: number

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.