mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-19 15:35:52 +00:00
Improved block collision check
This commit is contained in:
parent
8a8a95480e
commit
45dbb3f828
@ -994,9 +994,9 @@ abstract class Entity extends Position implements Metadatable{
|
||||
}
|
||||
|
||||
protected function checkBlockCollision(){
|
||||
$minX = floor($this->boundingBox->minX + 0.001);
|
||||
$minY = floor($this->boundingBox->minY + 0.001);
|
||||
$minZ = floor($this->boundingBox->minZ + 0.001);
|
||||
$minX = floor($this->boundingBox->minX - 0.001);
|
||||
$minY = floor($this->boundingBox->minY - 0.001);
|
||||
$minZ = floor($this->boundingBox->minZ - 0.001);
|
||||
$maxX = floor($this->boundingBox->maxX + 0.001);
|
||||
$maxY = floor($this->boundingBox->maxY + 0.001);
|
||||
$maxZ = floor($this->boundingBox->maxZ + 0.001);
|
||||
|
@ -135,6 +135,8 @@ abstract class Living extends Entity implements Damageable{
|
||||
}
|
||||
|
||||
$this->extinguish();
|
||||
}else{
|
||||
$this->airTicks = 300;
|
||||
}
|
||||
|
||||
if($this->attackTime > 0){
|
||||
|
Loading…
x
Reference in New Issue
Block a user