Skip to content

Commit

Permalink
修正能够通过挤压爬墙功能
Browse files Browse the repository at this point in the history
  • Loading branch information
TartaricAcid committed Jan 5, 2025
1 parent 4db6b74 commit 18302e4
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2000,13 +2000,7 @@ public Vec3 handleRelativeFrictionAndCalculateMovement(Vec3 deltaMovement, float
this.moveRelative(this.getFrictionInfluencedSpeed(friction), deltaMovement);
this.setDeltaMovement(this.handleOnClimbable(this.getDeltaMovement()));
this.move(MoverType.SELF, this.getDeltaMovement());
Vec3 vec3 = this.getDeltaMovement();
boolean isCollisionOrJump = this.horizontalCollision || this.jumping;
// 如果是爬行,就需要禁用这个由于碰撞箱等的向上的动力源
if (isCollisionOrJump && !this.onClimbable()) {
vec3 = new Vec3(vec3.x, 0.2, vec3.z);
}
return vec3;
return this.getDeltaMovement();
}

public void setNavigation(PathNavigation navigation) {
Expand Down

0 comments on commit 18302e4

Please sign in to comment.