Documentation

BrewingStand extends Spawnable
in package
implements Container, Nameable Uses ContainerTrait, NameableTrait

Interfaces, Classes, Traits and Enums

Container
Nameable

Table of Contents

TAG_ID  = "id"
TAG_X  = "x"
TAG_Y  = "y"
TAG_Z  = "z"
TAG_BREW_TIME  = "BrewTime"
TAG_BREW_TIME_PE  = "CookTime"
TAG_MAX_FUEL_TIME  = "FuelTotal"
TAG_REMAINING_FUEL_TIME  = "Fuel"
TAG_REMAINING_FUEL_TIME_PE  = "FuelAmount"
$closed  : bool
$position  : Position
$timings  : TimingsHandler
$brewTime  : int
$customName  : string|null
$dirty  : bool
$inventory  : BrewingStandInventory
$lock  : string|null
$maxFuelTime  : int
$remainingFuelTime  : int
$spawnCompoundCache  : CacheableNbt|null
__construct()  : mixed
__destruct()  : mixed
canOpenWith()  : bool
close()  : void
copyDataFromItem()  : void
getBlock()  : Block
getCleanedNBT()  : CompoundTag|null
getDefaultName()  : string
getInventory()  : BrewingStandInventory
getName()  : string
getPosition()  : Position
getRealInventory()  : BrewingStandInventory
getSerializedSpawnCompound()  : CacheableNbt
Returns encoded NBT (varint, little-endian) used to spawn this tile to clients. Uses cache where possible, populates cache if it is null.
getSpawnCompound()  : CompoundTag
hasName()  : bool
isClosed()  : bool
isDirty()  : bool
Returns whether the tile needs to be respawned to viewers.
onBlockDestroyed()  : void
Called when the tile's block is destroyed.
readSaveData()  : void
saveNBT()  : CompoundTag
setDirty()  : void
setName()  : void
addAdditionalSpawnData()  : void
An extension to getSpawnCompound() for further modifying the generic tile NBT.
loadItems()  : void
loadName()  : void
onBlockDestroyedHook()  : void
Override this method to do actions you need to do when this tile is destroyed due to block being broken.
saveItems()  : void
saveName()  : void
writeSaveData()  : void

Constants

TAG_ID

public mixed TAG_ID = "id"

TAG_X

public mixed TAG_X = "x"

TAG_Y

public mixed TAG_Y = "y"

TAG_Z

public mixed TAG_Z = "z"

TAG_BREW_TIME_PE

private mixed TAG_BREW_TIME_PE = "CookTime"

TAG_MAX_FUEL_TIME

private mixed TAG_MAX_FUEL_TIME = "FuelTotal"

TAG_REMAINING_FUEL_TIME

private mixed TAG_REMAINING_FUEL_TIME = "Fuel"

TAG_REMAINING_FUEL_TIME_PE

private mixed TAG_REMAINING_FUEL_TIME_PE = "FuelAmount"

Properties

$closed

public bool $closed = false

$spawnCompoundCache

private CacheableNbt|null $spawnCompoundCache = null
Tags
phpstan-var

CacheableNbt<\pocketmine\nbt\tag\CompoundTag>|null

Methods

__destruct()

public __destruct() : mixed
Return values
mixed

copyDataFromItem()

public copyDataFromItem(Item $item) : void
Parameters
$item : Item
Tags
see
Tile::copyDataFromItem()
Return values
void

getDefaultName()

public getDefaultName() : string
Return values
string

getName()

public getName() : string
Return values
string

getSerializedSpawnCompound()

Returns encoded NBT (varint, little-endian) used to spawn this tile to clients. Uses cache where possible, populates cache if it is null.

public final getSerializedSpawnCompound() : CacheableNbt
Tags
phpstan-return

CacheableNbt<\pocketmine\nbt\tag\CompoundTag>

Return values
CacheableNbt

isClosed()

public isClosed() : bool
Return values
bool

isDirty()

Returns whether the tile needs to be respawned to viewers.

public isDirty() : bool
Return values
bool

onBlockDestroyed()

Called when the tile's block is destroyed.

public final onBlockDestroyed() : void
Return values
void

setDirty()

public setDirty([bool $dirty = true ]) : void
Parameters
$dirty : bool = true
Return values
void

setName()

public setName(string $name) : void
Parameters
$name : string
Return values
void

addAdditionalSpawnData()

An extension to getSpawnCompound() for further modifying the generic tile NBT.

protected abstract addAdditionalSpawnData(CompoundTag $nbt) : void
Parameters
$nbt : CompoundTag
Return values
void

onBlockDestroyedHook()

Override this method to do actions you need to do when this tile is destroyed due to block being broken.

protected onBlockDestroyedHook() : void
Return values
void

Search results