PocketMine-MP 5.21.3 git-fcef015f32c0b0709cfd4d6f1b3c32f484b25bde
Loading...
Searching...
No Matches
pocketmine\block\tile\Furnace Class Reference
+ Inheritance diagram for pocketmine\block\tile\Furnace:
+ Collaboration diagram for pocketmine\block\tile\Furnace:

Public Member Functions

 __construct (World $world, Vector3 $pos)
 
 canOpenWith (string $key)
 
 clearSpawnCompoundCache ()
 
 close ()
 
 copyDataFromItem (Item $item)
 
 getBlock ()
 
 getCleanedNBT ()
 
 getDefaultName ()
 
 getFurnaceType ()
 
 getInventory ()
 
 getName ()
 
 getPosition ()
 
 getRealInventory ()
 
 getRenderUpdateBugWorkaroundStateProperties (Block $block)
 
 getSerializedSpawnCompound ()
 
 getSpawnCompound ()
 
 hasName ()
 
 isClosed ()
 
 isDirty ()
 
 onBlockDestroyed ()
 
 onUpdate ()
 
 readSaveData (CompoundTag $nbt)
 
 saveNBT ()
 
 setDirty (bool $dirty=true)
 
 setName (string $str)
 

Public Attributes

bool $closed = false
 
const TAG_BURN_TIME = "BurnTime"
 
const TAG_COOK_TIME = "CookTime"
 
const TAG_CUSTOM_NAME = "CustomName"
 
const TAG_ID = "id"
 
const TAG_ITEMS = "Items"
 
const TAG_LOCK = "Lock"
 
const TAG_MAX_TIME = "MaxTime"
 
const TAG_X = "x"
 
const TAG_Y = "y"
 
const TAG_Z = "z"
 

Protected Member Functions

 addAdditionalSpawnData (CompoundTag $nbt)
 
 checkFuel (Item $fuel)
 
 onBlockDestroyedHook ()
 
 onStartSmelting ()
 
 onStopSmelting ()
 
 writeSaveData (CompoundTag $nbt)
 

Protected Attributes

FurnaceInventory $inventory
 
Position $position
 
TimingsHandler $timings
 

Detailed Description

Definition at line 43 of file tile/Furnace.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\block\tile\Furnace::__construct ( World $world,
Vector3 $pos )

Reimplemented from pocketmine\block\tile\Tile.

Definition at line 56 of file tile/Furnace.php.

Member Function Documentation

◆ addAdditionalSpawnData()

◆ canOpenWith()

pocketmine\block\tile\Container::canOpenWith ( string $key)
inherited

Returns whether this container can be opened by an item with the given custom name.

◆ checkFuel()

pocketmine\block\tile\Furnace::checkFuel ( Item $fuel)
protected

Definition at line 115 of file tile/Furnace.php.

◆ clearSpawnCompoundCache()

pocketmine\block\tile\Spawnable::clearSpawnCompoundCache ( )
inherited

Definition at line 52 of file Spawnable.php.

◆ close()

pocketmine\block\tile\Furnace::close ( )

Reimplemented from pocketmine\block\tile\Tile.

Definition at line 99 of file tile/Furnace.php.

◆ copyDataFromItem()

pocketmine\block\tile\Tile::copyDataFromItem ( Item $item)
inherited

Definition at line 92 of file Tile.php.

◆ getBlock()

pocketmine\block\tile\Tile::getBlock ( )
inherited

Definition at line 98 of file Tile.php.

◆ getCleanedNBT()

pocketmine\block\tile\Tile::getCleanedNBT ( )
inherited

Definition at line 82 of file Tile.php.

◆ getDefaultName()

pocketmine\block\tile\Furnace::getDefaultName ( )

Implements pocketmine\block\tile\Nameable.

Definition at line 95 of file tile/Furnace.php.

◆ getInventory()

pocketmine\block\tile\Furnace::getInventory ( )

Implements pocketmine\inventory\InventoryHolder.

Definition at line 107 of file tile/Furnace.php.

◆ getPosition()

pocketmine\block\tile\Tile::getPosition ( )
inherited

Definition at line 102 of file Tile.php.

◆ getRealInventory()

pocketmine\block\tile\Furnace::getRealInventory ( )

Implements pocketmine\block\tile\Container.

Definition at line 111 of file tile/Furnace.php.

◆ getRenderUpdateBugWorkaroundStateProperties()

pocketmine\block\tile\Spawnable::getRenderUpdateBugWorkaroundStateProperties ( Block $block)
inherited

The Bedrock client won't re-render a block if the block's state properties didn't change. This is a problem when the tile may affect the block's appearance. For example, a cauldron's liquid changes colour based on the dye inside.

This is worked around in vanilla by modifying one of the block's state properties to a different value, and then changing it back again. Since we don't want to litter core implementation with hacks like this, we brush it under the rug into Tile.

Returns
ByteTag[]|IntTag[]|StringTag[] @phpstan-return array<string, IntTag|StringTag|ByteTag>

Reimplemented in pocketmine\block\tile\Cauldron, and pocketmine\block\tile\FlowerPot.

Definition at line 68 of file Spawnable.php.

◆ getSerializedSpawnCompound()

pocketmine\block\tile\Spawnable::getSerializedSpawnCompound ( )
finalinherited

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

@phpstan-return CacheableNbt<\pocketmine\nbt\tag\CompoundTag>

Definition at line 78 of file Spawnable.php.

◆ getSpawnCompound()

pocketmine\block\tile\Spawnable::getSpawnCompound ( )
finalinherited

Definition at line 86 of file Spawnable.php.

◆ isClosed()

pocketmine\block\tile\Tile::isClosed ( )
inherited

Definition at line 106 of file Tile.php.

◆ isDirty()

pocketmine\block\tile\Spawnable::isDirty ( )
inherited
Deprecated

Definition at line 41 of file Spawnable.php.

◆ onBlockDestroyed()

pocketmine\block\tile\Tile::onBlockDestroyed ( )
finalinherited

Called when the tile's block is destroyed.

Definition at line 117 of file Tile.php.

References pocketmine\block\tile\onBlockDestroyedHook().

+ Here is the call graph for this function:

◆ onBlockDestroyedHook()

pocketmine\block\tile\Tile::onBlockDestroyedHook ( )
protectedinherited

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

Reimplemented in pocketmine\block\tile\Chest, pocketmine\block\tile\Jukebox, and pocketmine\block\tile\ShulkerBox.

Definition at line 125 of file Tile.php.

◆ onStartSmelting()

pocketmine\block\tile\Furnace::onStartSmelting ( )
protected

Definition at line 130 of file tile/Furnace.php.

◆ onStopSmelting()

pocketmine\block\tile\Furnace::onStopSmelting ( )
protected

Definition at line 138 of file tile/Furnace.php.

◆ onUpdate()

pocketmine\block\tile\Furnace::onUpdate ( )

Definition at line 148 of file tile/Furnace.php.

◆ readSaveData()

pocketmine\block\tile\Furnace::readSaveData ( CompoundTag $nbt)

Reimplemented from pocketmine\block\tile\Tile.

Definition at line 66 of file tile/Furnace.php.

◆ saveNBT()

pocketmine\block\tile\Tile::saveNBT ( )
inherited

Definition at line 70 of file Tile.php.

◆ setDirty()

pocketmine\block\tile\Spawnable::setDirty ( bool $dirty = true)
inherited
Deprecated

Definition at line 48 of file Spawnable.php.

◆ writeSaveData()

pocketmine\block\tile\Furnace::writeSaveData ( CompoundTag $nbt)
protected

Writes additional save data to a CompoundTag, not including generic things like ID and coordinates.

Reimplemented from pocketmine\block\tile\Tile.

Definition at line 87 of file tile/Furnace.php.

Member Data Documentation

◆ $closed

bool pocketmine\block\tile\Tile::$closed = false
inherited

Definition at line 50 of file Tile.php.

◆ $inventory

FurnaceInventory pocketmine\block\tile\Furnace::$inventory
protected

Definition at line 51 of file tile/Furnace.php.

◆ $position

Position pocketmine\block\tile\Tile::$position
protectedinherited

Definition at line 49 of file Tile.php.

◆ $timings

TimingsHandler pocketmine\block\tile\Tile::$timings
protectedinherited

Definition at line 51 of file Tile.php.

◆ TAG_BURN_TIME

const pocketmine\block\tile\Furnace::TAG_BURN_TIME = "BurnTime"

Definition at line 47 of file tile/Furnace.php.

◆ TAG_COOK_TIME

const pocketmine\block\tile\Furnace::TAG_COOK_TIME = "CookTime"

Definition at line 48 of file tile/Furnace.php.

◆ TAG_CUSTOM_NAME

const pocketmine\block\tile\Nameable::TAG_CUSTOM_NAME = "CustomName"
inherited

Definition at line 27 of file Nameable.php.

◆ TAG_ID

const pocketmine\block\tile\Tile::TAG_ID = "id"
inherited

Definition at line 44 of file Tile.php.

◆ TAG_ITEMS

const pocketmine\block\tile\Container::TAG_ITEMS = "Items"
inherited

Definition at line 30 of file Container.php.

◆ TAG_LOCK

const pocketmine\block\tile\Container::TAG_LOCK = "Lock"
inherited

Definition at line 31 of file Container.php.

◆ TAG_MAX_TIME

const pocketmine\block\tile\Furnace::TAG_MAX_TIME = "MaxTime"

Definition at line 49 of file tile/Furnace.php.

◆ TAG_X

const pocketmine\block\tile\Tile::TAG_X = "x"
inherited

Definition at line 45 of file Tile.php.

◆ TAG_Y

const pocketmine\block\tile\Tile::TAG_Y = "y"
inherited

Definition at line 46 of file Tile.php.

◆ TAG_Z

const pocketmine\block\tile\Tile::TAG_Z = "z"
inherited

Definition at line 47 of file Tile.php.


The documentation for this class was generated from the following file: