Class BlockPotionContainerComponentBeta

Represents a fluid container block that currently contains a potion.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

block: Block

Remarks

Block instance that this component pertains to.

fillLevel: number

Remarks

This property can't be edited in read-only mode.

typeId: string
componentId: "minecraft:potionContainer" = 'minecraft:potionContainer'

Remarks

Identifier of this component. Should always be minecraft:potionContainer.

Methods

  • Parameters

    • item: ItemStack

      Potion to use as the type of potion for this potion container.

    Returns void

    Remarks

    Sets the potion type based on an item stack.

    This function can't be called in read-only mode.

    Throws

    This function can throw errors.