mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed holding space causing the player to drift upwards whilst flying
This commit is contained in:
parent
3d9eef0ceb
commit
140f02536e
1 changed files with 6 additions and 0 deletions
|
@ -37,6 +37,7 @@ import net.minecraft.particle.ParticleTypes;
|
||||||
import net.minecraft.predicate.entity.EntityPredicates;
|
import net.minecraft.predicate.entity.EntityPredicates;
|
||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import net.minecraft.sound.SoundEvents;
|
import net.minecraft.sound.SoundEvents;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.math.*;
|
import net.minecraft.util.math.*;
|
||||||
import net.minecraft.world.event.GameEvent;
|
import net.minecraft.world.event.GameEvent;
|
||||||
|
|
||||||
|
@ -290,6 +291,11 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
} else {
|
} else {
|
||||||
strafe *= 0.28;
|
strafe *= 0.28;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (((LivingEntityDuck)entity).isJumping()) {
|
||||||
|
velocity.y -= 0.2F * getGravitySignum();
|
||||||
|
velocity.y /= 2F;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
prevStrafe = 0;
|
prevStrafe = 0;
|
||||||
strafe = 0;
|
strafe = 0;
|
||||||
|
|
Loading…
Reference in a new issue