Skip to content

BlockEntityData 5.46.0 ​

final class · pocketmine\world\generator\vanilla\feature\BlockEntityData · source

Saved data of the tiles that features give to their blocks (Bedrock tile format, see the tiles in pocketmine\block\tile), built from what vanilla's features put in their block entities.

Methods ​

beehive() ​

php
public static function beehive(array $ticksInHive) : \pocketmine\nbt\tag\CompoundTag

A bee nest or beehive holding bees that have been inside for the given numbers of ticks (vanilla's occupants with ticks_in_hive, which leave after more than 600 ticks inside).

brushable() ​

php
public static function brushable(string $javaLootTable, int $seed) : \pocketmine\nbt\tag\CompoundTag

Suspicious sand or gravel that uncovers an item of a loot table when brushed.

fromJava() ​

php
public static function fromJava(string $javaBlock, \pocketmine\nbt\tag\CompoundTag $nbt) : ?\pocketmine\nbt\tag\CompoundTag

Converts the block entity data of a structure template block (Java format, after the structure processors) to Bedrock tile data, or returns null if it is not supported (only loot tables of containers and brushable blocks are; other data is dropped).

isRandomizableContainer() ​

php
public static function isRandomizableContainer(string $javaBlock) : bool

Whether a Java block's block entity is a RandomizableContainer (StructureTemplate.placeInWorld() gives those a new loot seed from the placement random).

lootContainer() ​

php
public static function lootContainer(string $tileId, string $javaLootTable, int $seed) : \pocketmine\nbt\tag\CompoundTag

A container that fills itself from a loot table when it is first opened (RandomizableContainer).

spawner() ​

php
public static function spawner(string $entityId) : \pocketmine\nbt\tag\CompoundTag

A monster spawner of the given mob ("minecraft:zombie").

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.