mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 16:24:05 +00:00
Revert "Living: fix knockback condition, take 2"
This reverts commit 0081e30a896a730f9598353353f6ee258803850e. The logic introduced by this commit is correct in MC JAVA 1.9+. Unfortunately, nobody likes 1.9+ for combat. Some testing in MCPE vanilla made it apparent that this logic isn't correct for MCPE. The old logic is correct for pre-1.9 knockback.
This commit is contained in:
parent
124ebf69c5
commit
2b30ef1671
@ -575,17 +575,14 @@ abstract class Living extends Entity implements Damageable{
|
||||
$motion = clone $this->motion;
|
||||
|
||||
$motion->x /= 2;
|
||||
$motion->y /= 2;
|
||||
$motion->z /= 2;
|
||||
$motion->x += $x * $f * $base;
|
||||
$motion->y += $base;
|
||||
$motion->z += $z * $f * $base;
|
||||
|
||||
if($this->onGround){
|
||||
$motion->y /= 2;
|
||||
$motion->y += $base;
|
||||
|
||||
if($motion->y > 0.4){ //this is hardcoded in vanilla
|
||||
$motion->y = 0.4;
|
||||
}
|
||||
if($motion->y > $base){
|
||||
$motion->y = $base;
|
||||
}
|
||||
|
||||
$this->setMotion($motion);
|
||||
|
Loading…
x
Reference in New Issue
Block a user