mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
riding on rails physics port(not full)
This commit is contained in:
parent
5c41d9605f
commit
7b2b914865
2 changed files with 250 additions and 3 deletions
|
|
@ -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])){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue