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

@ -57,7 +57,7 @@ abstract class PressurePlate extends Transparent{
return [];
}
public function getSupportType(int $facing) : SupportType{
public function getSupportType(Facing $facing) : SupportType{
return SupportType::NONE;
}
@ -83,10 +83,10 @@ abstract class PressurePlate extends Transparent{
*/
protected function getActivationBox() : AxisAlignedBB{
return AxisAlignedBB::one()
->squash(Axis::X, 1 / 8)
->squash(Axis::Z, 1 / 8)
->trim(Facing::UP, 3 / 4)
->offset($this->position->x, $this->position->y, $this->position->z);
->squashedCopy(Axis::X, 1 / 8)
->squashedCopy(Axis::Z, 1 / 8)
->trimmedCopy(Facing::UP, 3 / 4)
->offsetCopy($this->position->x, $this->position->y, $this->position->z);
}
/**