API reference / @jsprismarine/prismarine / world/brewing
world/brewing
Interfaces
BrewingTick
Defined in: packages/prismarine/src/world/brewing.ts:268
One brewing stand update.
Properties
bottles
readonlybottles:BrewingBottles
Defined in: packages/prismarine/src/world/brewing.ts:274
Which bottle slots hold something, which the block's states show.
brewed
readonlybrewed:boolean
Defined in: packages/prismarine/src/world/brewing.ts:276
Whether a brew finished, which plays the stand's brewing sound.
changedSlots
readonlychangedSlots: readonlynumber[]
Defined in: packages/prismarine/src/world/brewing.ts:272
The slots whose stacks changed, in slot order; empty for none.
drops
readonlydrops: readonlyItemDrop[]
Defined in: packages/prismarine/src/world/brewing.ts:278
What the stand drops beside itself: a remainder its slot had no room for.
tags
readonlytags:NBTTagCompound
Defined in: packages/prismarine/src/world/brewing.ts:270
The complete block entity after its timers and inventory advance.
Type Aliases
BrewingBottles
BrewingBottles =
Readonly<Record<typeofBOTTLE_STATES[number],boolean>>
Defined in: packages/prismarine/src/world/brewing.ts:78
Which bottle slots hold something, as the block shows them.
Variables
BREWING_BOTTLE_SLOTS
constBREWING_BOTTLE_SLOTS:3=3
Defined in: packages/prismarine/src/world/brewing.ts:30
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
constBREWING_DATA_BREW_TIME:0=0
Defined in: packages/prismarine/src/world/brewing.ts:50
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
constBREWING_DATA_FUEL_AMOUNT:1=1
Defined in: packages/prismarine/src/world/brewing.ts:53
The property holding how many brews the burned fuel has left.
BREWING_DATA_FUEL_TOTAL
constBREWING_DATA_FUEL_TOTAL:2=2
Defined in: packages/prismarine/src/world/brewing.ts:56
The property holding how many brews the last fuel item gave, which the fuel bar is a fraction of.
BREWING_FUEL_SLOT
constBREWING_FUEL_SLOT:4=4
Defined in: packages/prismarine/src/world/brewing.ts:36
The stand's fuel slot, which takes blaze powder.
BREWING_INGREDIENT_SLOT
constBREWING_INGREDIENT_SLOT:3=3
Defined in: packages/prismarine/src/world/brewing.ts:33
The stand's ingredient slot, above the bottles.
BREW_TICKS
constBREW_TICKS:400=400
Defined in: packages/prismarine/src/world/brewing.ts:43
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
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
What the stand holds.
Returns
boolean
brewingBottlesOf()
brewingBottlesOf(
stand):BrewingBottles
Defined in: packages/prismarine/src/world/brewing.ts:119
Which bottle slots of a loaded stand hold something, read from its items without rebuilding its record.
Parameters
stand
The brewing stand.
Returns
brewingScreenData()
brewingScreenData(
source):ReadonlyMap<number,number>
Defined in: packages/prismarine/src/world/brewing.ts:85
What a brewing stand's screen has to be told after a tick, by property id.
Parameters
source
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
Whether a stack can power a brewing stand, which is what its fuel slot takes.
Parameters
content
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
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
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
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
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
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|undefined
Defined in: packages/prismarine/src/world/brewing.ts:314
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
The item types and recipes this world is running.
stand
The brewing stand's block entity.
Returns
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