mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 10:01:53 +00:00
Tile: call parent constructor instead of duping code
This commit is contained in:
parent
d8dc89e7c8
commit
febba6e3a6
@ -157,13 +157,10 @@ abstract class Tile extends Position{
|
|||||||
|
|
||||||
$this->namedtag = $nbt;
|
$this->namedtag = $nbt;
|
||||||
$this->server = $level->getServer();
|
$this->server = $level->getServer();
|
||||||
$this->setLevel($level);
|
|
||||||
|
|
||||||
$this->name = "";
|
$this->name = "";
|
||||||
$this->id = Tile::$tileCount++;
|
$this->id = Tile::$tileCount++;
|
||||||
$this->x = $this->namedtag->getInt(self::TAG_X);
|
|
||||||
$this->y = $this->namedtag->getInt(self::TAG_Y);
|
parent::__construct($this->namedtag->getInt(self::TAG_X), $this->namedtag->getInt(self::TAG_Y), $this->namedtag->getInt(self::TAG_Z), $level);
|
||||||
$this->z = $this->namedtag->getInt(self::TAG_Z);
|
|
||||||
|
|
||||||
$this->getLevel()->addTile($this);
|
$this->getLevel()->addTile($this);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user