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

@ -72,14 +72,14 @@ class Anvil extends Transparent implements Fallable, HorizontalFacing{
}
protected function recalculateCollisionBoxes() : array{
return [AxisAlignedBB::one()->squash(Facing::axis(Facing::rotateY($this->facing, false)), 1 / 8)];
return [AxisAlignedBB::one()->squashedCopy(Facing::axis(Facing::rotateY($this->facing, false)), 1 / 8)];
}
public function getSupportType(int $facing) : SupportType{
public function getSupportType(Facing $facing) : SupportType{
return SupportType::NONE;
}
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
public function onInteract(Item $item, Facing $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
if($player instanceof Player){
$player->setCurrentWindow(new AnvilInventory($this->position));
}
@ -87,7 +87,7 @@ class Anvil extends Transparent implements Fallable, HorizontalFacing{
return true;
}
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, ?Player $player = null) : bool{
public function place(BlockTransaction $tx, Item $item, Block $blockReplace, Block $blockClicked, Facing $face, Vector3 $clickVector, ?Player $player = null) : bool{
if($player !== null){
$this->facing = Facing::rotateY($player->getHorizontalFacing(), false);
}