mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-02 00:02:57 +00:00
Fix book placed in wrong slot in Chiseled Bookshelf (#6085)
This commit is contained in:
parent
c9163a1505
commit
8b52a5cd9e
@ -97,8 +97,9 @@ class ChiseledBookshelf extends Opaque{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$x = Facing::axis($face) === Axis::X ? $clickVector->getZ() : $clickVector->getX();
|
||||||
$slot = ChiseledBookshelfSlot::fromBlockFaceCoordinates(
|
$slot = ChiseledBookshelfSlot::fromBlockFaceCoordinates(
|
||||||
Facing::axis($face) === Axis::X ? $clickVector->getZ() : $clickVector->getX(),
|
Facing::isPositive(Facing::rotateY($face, true)) ? 1 - $x : $x,
|
||||||
$clickVector->y
|
$clickVector->y
|
||||||
);
|
);
|
||||||
$tile = $this->position->getWorld()->getTile($this->position);
|
$tile = $this->position->getWorld()->getTile($this->position);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user