BlockPotionContainerComponent Class

Caution

This class is still in pre-release. Its signature may change or it may be removed in future releases.

Extends

Represents a fluid container block that currently contains a potion.

Methods

setPotionType

setPotionType(itemStack: ItemStack): void

Sets the potion type based on an item stack.

Parameters

Important

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

Warning

This function can throw errors.

Constants

componentId

static read-only componentId = "minecraft:potionContainer";

Type: string