Integrate dev-major-next version of pocketmine/math

this is a reduced version compared to the original, due to the difficulty of getting rid of Facing values internally.
This commit is contained in:
Dylan K. Taylor
2025-08-29 21:47:20 +01:00
parent 97027db70a
commit 6f6b23d4e4
194 changed files with 909 additions and 873 deletions

View File

@ -92,7 +92,7 @@ abstract class Liquid extends Transparent{
return [];
}
public function getSupportType(int $facing) : SupportType{
public function getSupportType(Facing $facing) : SupportType{
return SupportType::NONE;
}
@ -170,7 +170,7 @@ abstract class Liquid extends Transparent{
$world = $this->position->getWorld();
foreach(Facing::HORIZONTAL as $j){
[$dx, $dy, $dz] = Facing::OFFSET[$j];
[$dx, $dy, $dz] = Facing::OFFSET[$j->value];
$sideX = $x + $dx;
$sideY = $y + $dy;
@ -206,7 +206,7 @@ abstract class Liquid extends Transparent{
if($this->falling){
foreach(Facing::HORIZONTAL as $facing){
[$dx, $dy, $dz] = Facing::OFFSET[$facing];
[$dx, $dy, $dz] = Facing::OFFSET[$facing->value];
if(
!$this->canFlowInto($world->getBlockAt($x + $dx, $y + $dy, $z + $dz)) ||
!$this->canFlowInto($world->getBlockAt($x + $dx, $y + $dy + 1, $z + $dz))