mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +00:00
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:
@ -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))
|
||||
|
Reference in New Issue
Block a user