Skip to content
BasaltSoftware
Bedrock 1.26.60

Site colour

Discord
Esc

    ↑↓ moveEnter openEsc close

    Keyboard shortcuts
    Ctrl K
    Search the whole site, from any page
    /
    Jump to the sidebar search, or search the whole site where there isn't one
    Enter
    Open the top search result
    Esc
    Clear the search, or close this panel
    ?
    Show these shortcuts
    Item components

    ItemBookComponent

    The ItemBookComponent class in @minecraft/server.

    Class in @minecraft/server

    Extends ItemComponent

    import { ItemBookComponent } from '@minecraft/server';
    protected constructor();

    read-only optional

    readonly author?: string;

    read-only

    readonly contents: (string | undefined)[];

    read-only

    readonly isSigned: boolean;

    read-only

    readonly pageCount: number;

    read-only

    readonly rawContents: (RawMessage | undefined)[];

    read-only optional

    readonly title?: string;

    static read-only

    static readonly componentId = 'minecraft:book';
    getPageContent(pageIndex: number): string | undefined;
    Parameters
    pageIndex
    number
    Returns
    string | undefined
    getRawPageContent(pageIndex: number): RawMessage | undefined;
    Parameters
    pageIndex
    number
    Returns
    RawMessage | undefined
    insertPage(pageIndex: number, content: (RawMessage | string)[] | RawMessage | string): void;
    Parameters
    pageIndex
    number
    content
    (RawMessage | string)[] | RawMessage | string
    removePage(pageIndex: number): void;
    Parameters
    pageIndex
    number
    setContents(contents: ((RawMessage | string)[] | RawMessage | string)[]): void;
    Parameters
    contents
    ((RawMessage | string)[] | RawMessage | string)[]
    setPageContent(pageIndex: number, content: (RawMessage | string)[] | RawMessage | string): void;
    Parameters
    pageIndex
    number
    content
    (RawMessage | string)[] | RawMessage | string
    signBook(title: string, author: string): void;
    Parameters
    title
    string
    author
    string

    From ItemComponent: typeId, isValid