Skip to content

API reference / @jsprismarine/prismarine / blockentity/BlockEntities / BrewingStand

Class: BrewingStand ​

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:138

A brewing stand: its three bottles, its ingredient and its fuel, and Bedrock's three timers, which world/brewing.ts advances.

CookTime is the brew's ticks left, FuelAmount the brews the fuel has left and FuelTotal what the last fuel item started with, which is what Bedrock's screen draws the fuel bar as a fraction of.

Extends ​

  • Container

Properties ​

constructor ​

constructor: typeof BlockEntity

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:23

TypeScript types this.constructor as Function. Declaring it as the class itself lets BlockEntity.getId read the static ID the subclass set. Emits nothing.

Inherited from ​

Container.constructor


position ​

readonly position: Vector3

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:28

Inherited from ​

Container.position


ID ​

readonly static ID: "BrewingStand" = 'BrewingStand'

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:139

Vanilla's id string - Chest, Sign, Furnace. Not a namespaced identifier.

Overrides ​

Container.ID

Methods ​

canReuseSerialization() ​

canReuseSerialization(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:53

Whether a caller can safely reuse a previously serialized form of this block entity. Mutable getters and setters disable reuse because their changes cannot be observed here.

Returns ​

boolean

Inherited from ​

Container.canReuseSerialization


getBrewTime() ​

getBrewTime(): number

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:148

The ticks the brew under way has left, or zero when nothing brews.

Returns ​

number


getCustomName() ​

getCustomName(): string | null

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:34

A container's display name, when the player has renamed it in an anvil.

Returns ​

string | null

Inherited from ​

Container.getCustomName


getFuelAmount() ​

getFuelAmount(): number

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:153

How many brews the fuel already burned has left.

Returns ​

number


getFuelTotal() ​

getFuelTotal(): number

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:158

How many brews the last fuel item gave, which the fuel bar is a fraction of.

Returns ​

number


getId() ​

getId(): string

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:41

Returns ​

string

Inherited from ​

Container.getId


getItems() ​

getItems(): Set<NBTTagCompound>

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:21

Returns ​

Set<NBTTagCompound>

Inherited from ​

Container.getItems


getPosition() ​

getPosition(): Vector3

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:45

Returns ​

Vector3

Inherited from ​

Container.getPosition


isEmpty() ​

isEmpty(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:29

Returns ​

boolean

Inherited from ​

Container.isEmpty


isMovable() ​

isMovable(): boolean

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:63

Whether a piston may push this. Vanilla stores it on every block entity.

Returns ​

boolean

Inherited from ​

Container.isMovable


toNBT() ​

toNBT(): NBTTagCompound

Defined in: packages/prismarine/src/blockentity/BlockEntity.ts:87

The compound to write back: the untouched remainder, then the fields this class models. Subclasses override, call super.toNBT(), and add theirs to the result.

Returns ​

NBTTagCompound

Inherited from ​

Container.toNBT


fromNBT() ​

static fromNBT(nbt): BrewingStand

Defined in: packages/prismarine/src/blockentity/BlockEntities.ts:142

Reads a brewing stand, keeping its timers and items in the compound they came in.

Parameters ​

nbt ​

NBTTagCompound

Returns ​

BrewingStand