mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Fixed floating changelings. Closes #204
This commit is contained in:
parent
23cf8bd702
commit
427fc7d210
1 changed files with 11 additions and 4 deletions
|
@ -420,9 +420,14 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
entity.setVelocity(entity.getVelocity().multiply(1, 0, 1));
|
entity.setVelocity(entity.getVelocity().multiply(1, 0, 1));
|
||||||
entity.setSneaking(false);
|
entity.setSneaking(false);
|
||||||
}
|
}
|
||||||
} else if (attachDirection != null && isFaceClimbable(entity.getWorld(), entity.getBlockPos(), attachDirection)) {
|
} else if (attachDirection != null) {
|
||||||
|
if (isFaceClimbable(entity.getWorld(), entity.getBlockPos(), attachDirection)) {
|
||||||
entity.setBodyYaw(attachDirection.asRotation());
|
entity.setBodyYaw(attachDirection.asRotation());
|
||||||
entity.prevBodyYaw = attachDirection.asRotation();
|
entity.prevBodyYaw = attachDirection.asRotation();
|
||||||
|
} else {
|
||||||
|
entity.setVelocity(vel);
|
||||||
|
entity.isClimbing();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -480,8 +485,10 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
||||||
@Override
|
@Override
|
||||||
public Optional<BlockPos> chooseClimbingPos() {
|
public Optional<BlockPos> chooseClimbingPos() {
|
||||||
if (getObservedSpecies() == Race.CHANGELING && getSpellSlot().get(SpellPredicate.IS_DISGUISE, false).isEmpty()) {
|
if (getObservedSpecies() == Race.CHANGELING && getSpellSlot().get(SpellPredicate.IS_DISGUISE, false).isEmpty()) {
|
||||||
|
if (isFaceClimbable(entity.getWorld(), entity.getBlockPos(), entity.getHorizontalFacing()) || canHangAt(entity.getBlockPos())) {
|
||||||
return Optional.of(entity.getBlockPos());
|
return Optional.of(entity.getBlockPos());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return super.chooseClimbingPos();
|
return super.chooseClimbingPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue