mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-23 21:38:00 +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.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.prevBodyYaw = attachDirection.asRotation();
|
||||
} else {
|
||||
entity.setVelocity(vel);
|
||||
entity.isClimbing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -480,8 +485,10 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
@Override
|
||||
public Optional<BlockPos> chooseClimbingPos() {
|
||||
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 super.chooseClimbingPos();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue