mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
entity fixes
This commit is contained in:
parent
834bb3d486
commit
394ede50e9
4 changed files with 35 additions and 90 deletions
|
|
@ -9,6 +9,7 @@ class Minecart extends Vehicle{
|
|||
|
||||
function __construct(Level $level, $eid, $class, $type = 0, $data = []){
|
||||
parent::__construct($level, $eid, $class, $type, $data);
|
||||
$this->canBeAttacked = true;
|
||||
$this->x = isset($this->data["TileX"]) ? $this->data["TileX"]:$this->x;
|
||||
$this->y = isset($this->data["TileY"]) ? $this->data["TileY"]:$this->y;
|
||||
$this->z = isset($this->data["TileZ"]) ? $this->data["TileZ"]:$this->z;
|
||||
|
|
@ -60,6 +61,7 @@ class Minecart extends Vehicle{
|
|||
$e->isRiding = false;
|
||||
return true;
|
||||
}
|
||||
parent::interactWith($e, $action);
|
||||
}
|
||||
|
||||
public function canRide($e)
|
||||
|
|
@ -67,4 +69,4 @@ class Minecart extends Vehicle{
|
|||
return !($this->linkedEntity instanceof Entity) && !$e->isRiding;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ class Painting extends Hanging{
|
|||
$this->y = isset($this->data["TileY"]) ? $this->data["TileY"]:$this->y;
|
||||
$this->z = isset($this->data["TileZ"]) ? $this->data["TileZ"]:$this->z;
|
||||
$this->setHealth(1, "generic");
|
||||
$this->canBeAttacked = true;
|
||||
$this->width = 1;
|
||||
$this->isStatic = true;
|
||||
}
|
||||
|
|
@ -28,4 +29,4 @@ class Painting extends Hanging{
|
|||
$pk->title = $this->data["Motive"];
|
||||
$player->dataPacket($pk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue