entities will collide with blocks like door, glass pane, iron bars

This commit is contained in:
GameHerobrine 2023-10-27 16:28:32 +03:00
parent df54826e4c
commit f3d726cddf
10 changed files with 107 additions and 8 deletions

View file

@ -28,6 +28,10 @@ class AxisAlignedBB{
return $this;
}
public function addMinMax($minX, $minY, $minZ, $maxX, $maxY, $maxZ){
return new AxisAlignedBB($this->minX + $minX, $this->minY + $minY, $this->minZ + $minZ, $this->maxX + $maxX, $this->maxY + $maxY, $this->maxZ + $maxZ);
}
public function addCoord($x, $y, $z){
$minX = $this->minX;
$minY = $this->minY;