mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 08:44:01 +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->server = $level->getServer();
|
||||
$this->setLevel($level);
|
||||
|
||||
$this->name = "";
|
||||
$this->id = Tile::$tileCount++;
|
||||
$this->x = $this->namedtag->getInt(self::TAG_X);
|
||||
$this->y = $this->namedtag->getInt(self::TAG_Y);
|
||||
$this->z = $this->namedtag->getInt(self::TAG_Z);
|
||||
|
||||
parent::__construct($this->namedtag->getInt(self::TAG_X), $this->namedtag->getInt(self::TAG_Y), $this->namedtag->getInt(self::TAG_Z), $level);
|
||||
|
||||
$this->getLevel()->addTile($this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user