mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Make tiles less dependent on runtime NBT, use properties instead
This will ultimately culminate in the complete removal of runtime NBT, so plugins should also follow these steps if they have custom data.
This commit is contained in:
@ -92,8 +92,8 @@ class StandingBanner extends Transparent{
|
||||
$tile = $this->level->getTile($this);
|
||||
|
||||
$drop = ItemFactory::get(Item::BANNER, ($tile instanceof TileBanner ? $tile->getBaseColor() : 0));
|
||||
if($tile instanceof TileBanner and ($patterns = $tile->namedtag->getListTag(TileBanner::TAG_PATTERNS)) !== null and !$patterns->empty()){
|
||||
$drop->setNamedTagEntry($patterns);
|
||||
if($tile instanceof TileBanner and !($patterns = $tile->getPatterns())->empty()){
|
||||
$drop->setNamedTagEntry(clone $patterns);
|
||||
}
|
||||
|
||||
return [$drop];
|
||||
|
Reference in New Issue
Block a user