mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29: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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue