mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Tile: fixed copying of custom block data
This commit is contained in:
parent
dc84484c2b
commit
ce4e0bf69c
@ -207,12 +207,10 @@ abstract class Tile extends Position{
|
||||
static::createAdditionalNBT($nbt, $pos, $face, $item, $player);
|
||||
|
||||
if($item !== null){
|
||||
if($item->hasCustomBlockData()){
|
||||
foreach($item->getCustomBlockData() as $customBlockDataTag){
|
||||
if(!($customBlockDataTag instanceof NamedTag)){
|
||||
continue;
|
||||
}
|
||||
$nbt->setTag($customBlockDataTag);
|
||||
$customBlockData = $item->getCustomBlockData();
|
||||
if($customBlockData !== null){
|
||||
foreach($customBlockData as $customBlockDataTag){
|
||||
$nbt->setTag(clone $customBlockDataTag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user