mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +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);
|
static::createAdditionalNBT($nbt, $pos, $face, $item, $player);
|
||||||
|
|
||||||
if($item !== null){
|
if($item !== null){
|
||||||
if($item->hasCustomBlockData()){
|
$customBlockData = $item->getCustomBlockData();
|
||||||
foreach($item->getCustomBlockData() as $customBlockDataTag){
|
if($customBlockData !== null){
|
||||||
if(!($customBlockDataTag instanceof NamedTag)){
|
foreach($customBlockData as $customBlockDataTag){
|
||||||
continue;
|
$nbt->setTag(clone $customBlockDataTag);
|
||||||
}
|
|
||||||
$nbt->setTag($customBlockDataTag);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user