mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Update for pocketmine/math Axis refactor
This commit is contained in:
@ -26,6 +26,7 @@ namespace pocketmine\block;
|
||||
use pocketmine\block\utils\AnyFacingTrait;
|
||||
use pocketmine\block\utils\BlockDataSerializer;
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\math\Axis;
|
||||
use pocketmine\math\AxisAlignedBB;
|
||||
use pocketmine\math\Facing;
|
||||
use pocketmine\math\Vector3;
|
||||
@ -41,7 +42,7 @@ class EndRod extends Flowable{
|
||||
|
||||
protected function writeStateToMeta() : int{
|
||||
$result = BlockDataSerializer::writeFacing($this->facing);
|
||||
if(Facing::axis($this->facing) !== Facing::AXIS_Y){
|
||||
if(Facing::axis($this->facing) !== Axis::Y){
|
||||
$result ^= 1; //TODO: in PC this is always the same as facing, just PE is stupid
|
||||
}
|
||||
|
||||
@ -84,7 +85,7 @@ class EndRod extends Flowable{
|
||||
$myAxis = Facing::axis($this->facing);
|
||||
|
||||
$bb = AxisAlignedBB::one();
|
||||
foreach([Facing::AXIS_Y, Facing::AXIS_Z, Facing::AXIS_X] as $axis){
|
||||
foreach([Axis::Y, Axis::Z, Axis::X] as $axis){
|
||||
if($axis === $myAxis){
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user