mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
fixed unmount (hopefully one last time)
This commit is contained in:
parent
5f5c2b82de
commit
fb13a6123b
10 changed files with 100 additions and 36 deletions
|
|
@ -78,6 +78,27 @@ class Minecart extends Vehicle{
|
|||
];
|
||||
}
|
||||
|
||||
public function update($now){
|
||||
if($this->closed === true){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function close()
|
||||
{
|
||||
parent::close();
|
||||
if($this->linkedEntity != 0){
|
||||
$ent = $this->level->entityList[$this->linkedEntity] ?? false;
|
||||
if($ent instanceof Entity){
|
||||
$ent->stopRiding();
|
||||
}else{
|
||||
ConsoleAPI::warn("$this is being ridden by invalid entity {$this->linkedEntity}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function isPushable(){
|
||||
return false; //TODO replace with true
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue