mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-14 01:39:52 +00:00
Remove unnecessary BannerPattern copying on block clone
This commit is contained in:
parent
9671b4d5cb
commit
dec6f73f2f
@ -36,7 +36,6 @@ use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\player\Player;
|
||||
use pocketmine\utils\Utils;
|
||||
use pocketmine\world\BlockTransaction;
|
||||
use function assert;
|
||||
use function floor;
|
||||
@ -67,7 +66,8 @@ class Banner extends Transparent{
|
||||
|
||||
public function __clone(){
|
||||
parent::__clone();
|
||||
$this->patterns = $this->patterns->map(Utils::cloneCallback());
|
||||
//pattern objects are considered immutable, so they don't need to be copied
|
||||
$this->patterns = $this->patterns->copy();
|
||||
}
|
||||
|
||||
public function getId() : int{
|
||||
|
Loading…
x
Reference in New Issue
Block a user