Living: use Vector3->down() instead of subtract().

This commit is contained in:
Dylan K. Taylor 2021-09-05 14:12:04 +01:00
parent 17dfd2cc52
commit 6b7e671794
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -319,7 +319,7 @@ abstract class Living extends Entity{
$fallBlockPos = $this->location->floor();
$fallBlock = $this->getWorld()->getBlock($fallBlockPos);
if(count($fallBlock->getCollisionBoxes()) === 0){
$fallBlockPos = $fallBlockPos->subtract(0, 1, 0);
$fallBlockPos = $fallBlockPos->down();
$fallBlock = $this->getWorld()->getBlock($fallBlockPos);
}
if($fallBlock->getId() !== BlockLegacyIds::AIR){