mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Added custom block data (example, chests), better deep checking of same NBT
This commit is contained in:
@ -109,6 +109,12 @@ class Chest extends Transparent{
|
||||
$nbt->CustomName = new String("CustomName", $item->getCustomName());
|
||||
}
|
||||
|
||||
if($item->hasCustomBlockData()){
|
||||
foreach($item->getCustomBlockData() as $key => $v){
|
||||
$nbt->{$key} = $v;
|
||||
}
|
||||
}
|
||||
|
||||
$tile = Tile::createTile("Chest", $this->getLevel()->getChunk($this->x >> 4, $this->z >> 4), $nbt);
|
||||
|
||||
if($chest instanceof TileChest and $tile instanceof TileChest){
|
||||
|
Reference in New Issue
Block a user