mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed creative flying glitch
This commit is contained in:
parent
1f05e46648
commit
a5aedf6c64
1 changed files with 3 additions and 5 deletions
|
@ -255,7 +255,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
|
|
||||||
entity.getAbilities().allowFlying = type.canFlyCreative(entity);
|
entity.getAbilities().allowFlying = type.canFlyCreative(entity);
|
||||||
|
|
||||||
boolean creative = entity.getAbilities().creativeMode || entity.isSpectator();
|
boolean creative = entity.isCreative() || entity.isSpectator();
|
||||||
|
|
||||||
boolean startedFlyingCreative = !creative && isFlyingEither != entity.getAbilities().flying;
|
boolean startedFlyingCreative = !creative && isFlyingEither != entity.getAbilities().flying;
|
||||||
|
|
||||||
|
@ -300,10 +300,8 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
}
|
}
|
||||||
|
|
||||||
lastFlightType = type;
|
lastFlightType = type;
|
||||||
if (!pony.isClient()) {
|
isFlyingSurvival = entity.getAbilities().flying && !creative;
|
||||||
isFlyingSurvival = entity.getAbilities().flying && !creative;
|
isFlyingEither = isFlyingSurvival || (creative && entity.getAbilities().flying);
|
||||||
isFlyingEither = isFlyingSurvival || (creative && entity.getAbilities().flying);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeChanged || startedFlyingCreative) {
|
if (typeChanged || startedFlyingCreative) {
|
||||||
entity.calculateDimensions();
|
entity.calculateDimensions();
|
||||||
|
|
Loading…
Reference in a new issue