Skip to content

Commit

Permalink
call tryCheckInsideBlocks in redirectSetVelocity
Browse files Browse the repository at this point in the history
  • Loading branch information
MoePus committed Sep 4, 2024
1 parent 968578a commit 0a0418f
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ private void redirectSetVelocity(final MoverType moverType, final Vec3 movement,
- collisionResponseHorizontalNormal.z() * parallelHorizontalVelocityComponent
);
}
// The rest of the move function (including tryCheckInsideBlocks) is skipped, so calling it here
tryCheckInsideBlocks();
// Cancel the original invocation of Entity.setVelocity(DDD)V to remove vanilla behavior
callbackInfo.cancel();
}
Expand Down Expand Up @@ -224,6 +226,9 @@ private void preSpawnSprintParticle(final CallbackInfo ci) {
@Shadow
public abstract void setDeltaMovement(double x, double y, double z);

@Shadow
protected abstract void tryCheckInsideBlocks();

@Shadow
protected abstract Vec3 collide(Vec3 vec3d);

Expand Down

0 comments on commit 0a0418f

Please sign in to comment.