The BlockFluidContainerComponent class in @minecraft/server.
Class in @minecraft/server
Extends BlockComponent
import { BlockFluidContainerComponent } from '@minecraft/server';Constructor
Section titled “Constructor”protected constructor();Properties
Section titled “Properties”fillLevel
Section titled “fillLevel”fillLevel: number;fluidColor
Section titled “fluidColor”fluidColor: RGBA;Types
componentId
Section titled “componentId”static read-only
static readonly componentId = 'minecraft:fluid_container';Methods
Section titled “Methods”addDye
Section titled “addDye”addDye(dye: ItemType): void;Parameters
dyeItemType
Types
getFluidType
Section titled “getFluidType”getFluidType(): FluidType;Returns
FluidTypeTypes
setFluidType
Section titled “setFluidType”setFluidType(fluidType: FluidType): void;Parameters
fluidTypeFluidType
Types
setPotion
Section titled “setPotion”setPotion(itemStack: ItemStack): void;Parameters
itemStackItemStack
Types
Inherited
Section titled “Inherited”From BlockComponent: block