[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / world/brewing

# world/brewing

## Interfaces

### BrewingTick

Defined in: [packages/prismarine/src/world/brewing.ts:268](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L268)

One brewing stand update.

#### Properties

##### bottles

> `readonly` **bottles**: [`BrewingBottles`](#brewingbottles)

Defined in: [packages/prismarine/src/world/brewing.ts:274](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L274)

Which bottle slots hold something, which the block's states show.

##### brewed

> `readonly` **brewed**: `boolean`

Defined in: [packages/prismarine/src/world/brewing.ts:276](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L276)

Whether a brew finished, which plays the stand's brewing sound.

##### changedSlots

> `readonly` **changedSlots**: readonly `number`[]

Defined in: [packages/prismarine/src/world/brewing.ts:272](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L272)

The slots whose stacks changed, in slot order; empty for none.

##### drops

> `readonly` **drops**: readonly [`ItemDrop`](https://jsprismarine.dev/api/@jsprismarine/block-behaviors/index.md#itemdrop)[]

Defined in: [packages/prismarine/src/world/brewing.ts:278](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L278)

What the stand drops beside itself: a remainder its slot had no room for.

##### tags

> `readonly` **tags**: [`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md)

Defined in: [packages/prismarine/src/world/brewing.ts:270](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L270)

The complete block entity after its timers and inventory advance.

## Type Aliases

### BrewingBottles

> **BrewingBottles** = `Readonly`\<`Record`\<*typeof* `BOTTLE_STATES`\[`number`\], `boolean`\>\>

Defined in: [packages/prismarine/src/world/brewing.ts:78](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L78)

Which bottle slots hold something, as the block shows them.

## Variables

### BREWING\_BOTTLE\_SLOTS

> `const` **BREWING\_BOTTLE\_SLOTS**: `3` = `3`

Defined in: [packages/prismarine/src/world/brewing.ts:30](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L30)

How many bottle slots the stand has, which are its slots 0 to 2 in Java's and Bedrock's numbering.

***

### BREWING\_DATA\_BREW\_TIME

> `const` **BREWING\_DATA\_BREW\_TIME**: `0` = `0`

Defined in: [packages/prismarine/src/world/brewing.ts:50](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L50)

The `ContainerSetDataPacket` properties a brewing stand's screen draws from: the brew's ticks
left, which is the arrow and the bubbles, then the brews the fuel has left and what the last
fuel item gave, which is the fuel bar. The ids are the Bedrock brewing stand screen's own.

***

### BREWING\_DATA\_FUEL\_AMOUNT

> `const` **BREWING\_DATA\_FUEL\_AMOUNT**: `1` = `1`

Defined in: [packages/prismarine/src/world/brewing.ts:53](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L53)

The property holding how many brews the burned fuel has left.

***

### BREWING\_DATA\_FUEL\_TOTAL

> `const` **BREWING\_DATA\_FUEL\_TOTAL**: `2` = `2`

Defined in: [packages/prismarine/src/world/brewing.ts:56](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L56)

The property holding how many brews the last fuel item gave, which the fuel bar is a fraction of.

***

### BREWING\_FUEL\_SLOT

> `const` **BREWING\_FUEL\_SLOT**: `4` = `4`

Defined in: [packages/prismarine/src/world/brewing.ts:36](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L36)

The stand's fuel slot, which takes blaze powder.

***

### BREWING\_INGREDIENT\_SLOT

> `const` **BREWING\_INGREDIENT\_SLOT**: `3` = `3`

Defined in: [packages/prismarine/src/world/brewing.ts:33](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L33)

The stand's ingredient slot, above the bottles.

***

### BREW\_TICKS

> `const` **BREW\_TICKS**: `400` = `400`

Defined in: [packages/prismarine/src/world/brewing.ts:43](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L43)

How many ticks one brew takes at a speed multiplier of 1, which every vanilla fuel has.

#### Java See

BrewingStandBlockEntity.serverTick

## Functions

### bottlesDiffer()

> **bottlesDiffer**(`states`, `bottles`): `boolean`

Defined in: [packages/prismarine/src/world/brewing.ts:140](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L140)

Whether a block's states show other bottles than a stand holds.

#### Parameters

##### states

`Readonly`\<`Record`\<`string`, `string` \| `number` \| `boolean`\>\>

The block's states.

##### bottles

[`BrewingBottles`](#brewingbottles)

What the stand holds.

#### Returns

`boolean`

***

### brewingBottlesOf()

> **brewingBottlesOf**(`stand`): [`BrewingBottles`](#brewingbottles)

Defined in: [packages/prismarine/src/world/brewing.ts:119](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L119)

Which bottle slots of a loaded stand hold something, read from its items without rebuilding
its record.

#### Parameters

##### stand

[`BrewingStand`](https://jsprismarine.dev/api/@jsprismarine/prismarine/blockentity/BlockEntities/classes/BrewingStand.md)

The brewing stand.

#### Returns

[`BrewingBottles`](#brewingbottles)

***

### brewingScreenData()

> **brewingScreenData**(`source`): `ReadonlyMap`\<`number`, `number`\>

Defined in: [packages/prismarine/src/world/brewing.ts:85](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L85)

What a brewing stand's screen has to be told after a tick, by property id.

#### Parameters

##### source

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| [`BrewingStand`](https://jsprismarine.dev/api/@jsprismarine/prismarine/blockentity/BlockEntities/classes/BrewingStand.md)

The current brewing stand or its serialized block entity.

#### Returns

`ReadonlyMap`\<`number`, `number`\>

***

### isBrewingFuelItem()

> **isBrewingFuelItem**(`content`, `identifier`): `boolean`

Defined in: [packages/prismarine/src/world/brewing.ts:247](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L247)

Whether a stack can power a brewing stand, which is what its fuel slot takes.

#### Parameters

##### content

[`ServerContent`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/ServerContent/index.md#servercontent)

The server's content, whose item types are read.

##### identifier

`string`

The item's Bedrock identifier.

#### Returns

`boolean`

#### Java See

BrewingStandMenu$FuelSlot.mayPlaceItem

***

### isBrewingReagent()

> **isBrewingReagent**(`content`, `item`): `boolean`

Defined in: [packages/prismarine/src/world/brewing.ts:206](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L206)

Whether a stack can go in a brewing stand's ingredient slot: whether it is the reagent of a
brewing recipe, by its item, which is Java's `BREWING_REAGENTS` property set.

#### Parameters

##### content

[`ServerContent`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/ServerContent/index.md#servercontent)

The server's content, whose brewing recipes are read.

##### item

The item, by its Bedrock identifier and data.

###### identifier

`string`

###### meta

`number`

#### Returns

`boolean`

#### Java See

BrewingStandMenu$IngredientsSlot.mayPlace

***

### isBrewingStand()

> **isBrewingStand**(`identifier`): `boolean`

Defined in: [packages/prismarine/src/world/brewing.ts:27](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L27)

Whether a block is a brewing stand.

#### Parameters

##### identifier

`string`

The block's identifier.

#### Returns

`boolean`

***

### isPotionInput()

> **isPotionInput**(`content`, `item`): `boolean`

Defined in: [packages/prismarine/src/world/brewing.ts:229](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L229)

Whether a stack can go in a brewing stand's bottle slot: whether it is the input of a brewing
recipe, by its item, which is Java's `BREWING_INPUTS` property set, or is in
`#minecraft:brewing_potion_inputs`.

#### Parameters

##### content

[`ServerContent`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/ServerContent/index.md#servercontent)

The server's content, whose brewing recipes and item tags are read.

##### item

The item, by its Bedrock identifier and data.

###### identifier

`string`

###### meta

`number`

#### Returns

`boolean`

#### Java Source

PotionIngredient.isPotionInput

***

### tickBrewingStand()

> **tickBrewingStand**(`content`, `stand`): [`BrewingTick`](#brewingtick) \| `undefined`

Defined in: [packages/prismarine/src/world/brewing.ts:314](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/world/brewing.ts#L314)

Advances one brewing stand by a game tick.

The fuel slot burns an item as soon as the stand has no fuel left, whether or not anything
brews. A brew starts when the ingredient brews at least one bottle and there is fuel to spend,
stops when the ingredient leaves or no bottle brews any more, and on its last tick turns every
bottle the ingredient brews and uses one of the ingredient up. As in Java, the last tick brews
before the ingredient is checked: an ingredient swapped in on that tick brews what it brews,
and one swapped in a tick earlier stops the brew.

Only the slots a tick changes are written back: every other stack keeps its compound as it was,
tags the item model does not read included.

Java leaves an item's crafting remainder in the fuel slot or the ingredient slot. The fuel's is
none, since no source names one, and the ingredient's is what the recipe book's remainder
lookup gives (`RecipeMatch.remainder`).

#### Parameters

##### content

[`ServerContent`](https://jsprismarine.dev/api/@jsprismarine/prismarine/content/ServerContent/index.md#servercontent)

The item types and recipes this world is running.

##### stand

[`BlockEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/blockentity/BlockEntity/classes/BlockEntity.md)

The brewing stand's block entity.

#### Returns

[`BrewingTick`](#brewingtick) \| `undefined`

The update, or undefined when nothing in the stand can change.

#### Java Source

BrewingStandBlockEntity.serverTick

#### Java Source

BrewingStandBlockEntity.isBrewable

#### Java Source

BrewingStandBlockEntity.doBrew
