mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +01:00
Don't invert whilst sleeping
This commit is contained in:
parent
e687dfcfcf
commit
8ae70da8e8
1 changed files with 5 additions and 0 deletions
|
@ -144,7 +144,12 @@ public class EntityPhysics<T extends Owned<? extends Entity>> implements Physics
|
|||
public float getGravityModifier() {
|
||||
Entity master = pony.getMaster();
|
||||
|
||||
|
||||
if (master instanceof LivingEntity) {
|
||||
if (((LivingEntity)master).isSleeping()) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (((LivingEntity)master).getAttributes() == null) {
|
||||
// may be null due to order of execution in the constructor.
|
||||
// Will have the default (1) here in any case, so it's safe to ignore the attribute at this point.
|
||||
|
|
Loading…
Reference in a new issue