Fixed players cancelling flight in creative whenever they touch something

This commit is contained in:
Sollace 2021-02-23 18:09:14 +02:00
parent bc9ecd798d
commit e0943fa48f

View file

@ -113,7 +113,7 @@ public class PlayerPhysics extends EntityPhysics<Pony> implements Tickable, Moti
if (isGravityNegative()) { if (isGravityNegative()) {
entity.setOnGround(!entity.world.isAir(new BlockPos(entity.getX(), entity.getY() + entity.getHeight() + 0.5F, entity.getZ()))); entity.setOnGround(!entity.world.isAir(new BlockPos(entity.getX(), entity.getY() + entity.getHeight() + 0.5F, entity.getZ())));
if (entity.isOnGround() || entity.horizontalCollision) { if (entity.isOnGround() || (!creative && entity.horizontalCollision)) {
entity.abilities.flying = false; entity.abilities.flying = false;
isFlyingEither = false; isFlyingEither = false;
isFlyingSurvival = false; isFlyingSurvival = false;