mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-03 10:32:33 +00:00
Revert change that can't go on stable
API additions need to wait for the next minor release Revert "Entity: make stepHeight accessable (#6702)" This reverts commit 5527a0c6bf4343b39cd6ed4526f75539ac6ddf19.
This commit is contained in:
parent
5527a0c6bf
commit
a554d2acf5
@ -1187,14 +1187,12 @@ abstract class Entity{
|
|||||||
|
|
||||||
$moveBB->offset(0, 0, $dz);
|
$moveBB->offset(0, 0, $dz);
|
||||||
|
|
||||||
$stepHeight = $this->getStepHeight();
|
if($this->stepHeight > 0 && $fallingFlag && ($wantedX !== $dx || $wantedZ !== $dz)){
|
||||||
|
|
||||||
if($stepHeight > 0 && $fallingFlag && ($wantedX !== $dx || $wantedZ !== $dz)){
|
|
||||||
$cx = $dx;
|
$cx = $dx;
|
||||||
$cy = $dy;
|
$cy = $dy;
|
||||||
$cz = $dz;
|
$cz = $dz;
|
||||||
$dx = $wantedX;
|
$dx = $wantedX;
|
||||||
$dy = $stepHeight;
|
$dy = $this->stepHeight;
|
||||||
$dz = $wantedZ;
|
$dz = $wantedZ;
|
||||||
|
|
||||||
$stepBB = clone $this->boundingBox;
|
$stepBB = clone $this->boundingBox;
|
||||||
@ -1264,14 +1262,6 @@ abstract class Entity{
|
|||||||
Timings::$entityMove->stopTiming();
|
Timings::$entityMove->stopTiming();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setStepHeight(float $stepHeight) : void{
|
|
||||||
$this->stepHeight = $stepHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getStepHeight() : float{
|
|
||||||
return $this->stepHeight;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function checkGroundState(float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz) : void{
|
protected function checkGroundState(float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz) : void{
|
||||||
$this->isCollidedVertically = $wantedY !== $dy;
|
$this->isCollidedVertically = $wantedY !== $dy;
|
||||||
$this->isCollidedHorizontally = ($wantedX !== $dx || $wantedZ !== $dz);
|
$this->isCollidedHorizontally = ($wantedX !== $dx || $wantedZ !== $dz);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user