riding on rails physics port(not full)

This commit is contained in:
GameHerobrine 2024-06-10 07:32:17 +03:00
parent 5c41d9605f
commit 7b2b914865
2 changed files with 250 additions and 3 deletions

View file

@ -1409,6 +1409,20 @@ class Entity extends Position
}
}
public function setPos($x, $y, $z){
$this->x = $x;
$this->y = $y;
$this->z = $z;
$this->boundingBox->minX = $x - $this->radius;
$this->boundingBox->minY = ($y - $this->yOffset); //TODO what is this + $this->ySize;
$this->boundingBox->minZ = $z - $this->radius;
$this->boundingBox->maxX = $x + $this->radius;
$this->boundingBox->maxY = $this->boundingBox->minY + $this->height;
$this->boundingBox->maxZ = $z + $this->radius;
}
public function setRiding(Entity $e, $type = 0)
{
if(!isset($this->level->entityList[$e->eid])){