mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Tile: use phpstan-friendly way to pass block NBT
fixes 1 level 8 error
This commit is contained in:
@ -89,8 +89,8 @@ abstract class Tile{
|
||||
* @throws \RuntimeException
|
||||
*/
|
||||
public function copyDataFromItem(Item $item) : void{
|
||||
if($item->hasCustomBlockData()){ //TODO: check item root tag (MCPE doesn't use BlockEntityTag)
|
||||
$this->readSaveData($item->getCustomBlockData());
|
||||
if(($blockNbt = $item->getCustomBlockData()) !== null){ //TODO: check item root tag (MCPE doesn't use BlockEntityTag)
|
||||
$this->readSaveData($blockNbt);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user