Fixed creative flight being cancelled when bumping into non-solid blocks

This commit is contained in:
Sollace 2021-07-10 00:20:21 +02:00
parent 64c5f2f3f1
commit e6c3c25ac4

View file

@ -49,7 +49,7 @@ public class EntityPhysics<T extends Entity> implements Physics, Copieable<Entit
entity.damage(DamageSource.OUT_OF_WORLD, 4.0F); entity.damage(DamageSource.OUT_OF_WORLD, 4.0F);
} }
entity.setOnGround(!entity.world.isAir(new BlockPos(entity.getX(), Math.floor(entity.getBoundingBox().maxY + 0.25), entity.getZ()))); entity.setOnGround(entity.verticalCollision && entity.getVelocity().getY() > 0);
} }
float gravity = this.getGravityModifier(); float gravity = this.getGravityModifier();