mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Blocks now save their bounding box, fixed entity block collision check
This commit is contained in:
@ -1040,9 +1040,9 @@ abstract class Entity extends Location implements Metadatable{
|
||||
$vector = Vector3::createVector(0, 0, 0);
|
||||
$v = Vector3::createVector(0, 0, 0);
|
||||
|
||||
for($v->z = $minZ; $v->z < $maxZ; ++$v->z){
|
||||
for($v->x = $minX; $v->x < $maxX; ++$v->x){
|
||||
for($v->y = $minY; $v->y < $maxY; ++$v->y){
|
||||
for($v->z = $minZ; $v->z <= $maxZ; ++$v->z){
|
||||
for($v->x = $minX; $v->x <= $maxX; ++$v->x){
|
||||
for($v->y = $minY; $v->y <= $maxY; ++$v->y){
|
||||
$block = $this->level->getBlock($v);
|
||||
if($block !== null and $block->hasEntityCollision){
|
||||
$block->onEntityCollide($this);
|
||||
|
Reference in New Issue
Block a user