mojira.dev
MC-279725

MC-152728 hasn't reverted properly

The Bug:

The fix for the bug where the player continues sprinting when performing actions that slow them down was partially reverted, but some changes were left behind.

Steps to Reproduce:

1. Start sprinting and have blindness.
2. Verify that the player stops sprinting.
3. Start sprinting, and be in fall flying mode, not be underwater.
4. Verify that the player stops sprinting.
5. Start sprinting and be a passenger in a vehicle that does not allow sprinting.
6. Verify that the player stops sprinting.

Observed Behavior:

The player stops sprinting when having blindness, being in fall flying mode and not being underwater, or being a passenger and the vehicle. However, the player should not stop sprinting when performing these actions if the fix is fully reverted.

Expected Behavior:

The player should not stop sprinting when having blindness, being in fall flying mode and not being underwater (flying with elytra especially), or being a passenger and the vehicle. The player should continue sprinting in these situations, just like they do when moving slowly, using an item, blocking with a shield, charging a bow or crossbow, preparing to throw a trident, using a goat horn.

Code Analysis:

The `shouldStopSprinting` method should be removed permanently, as it is no longer needed. This method is currently defined as:

net.minecraft.client.player.LocalPlayer.java
public class LocalPlayer extends AbstractClientPlayer {
   ...
   private boolean shouldStopSprinting() {
      return this.hasBlindness() || this.isFallFlying() && !this.isUnderWater() || this.isPassenger() && !this.vehicleCanSprint(this.getVehicle());
      }
   ...

Additionally, the call to `shouldStopSprinting` in the `aiStep` method should be removed:

public class LocalPlayer extends AbstractClientPlayer {
  ...
  public void aiStep() {
     ...
     if (this.shouldStopSprinting())
     { this.setSprinting(false); }
     ...

By removing these elements, the game will behave as it did before the bug was fixed, and the player will continue sprinting when performing actions that slow them down.

 

Attachments

Comments

migrated
[media][media]
Dhranios

In none of those cases could you start sprinting before, only keep your sprint from before doing those actions. Sprinting behavior is, in fact, the same as before.

TeyRine

@unknown the very fact that it was said to be a full behavioural reversion until the bug was fixed, however this did not happen. Also to me the behaviour with elytra is the most important thing that remained after the bug fix was reverted

Nassim Jahnke

None of these were present in the version before the fix (being 1.21.3), so your observed behavior is not a regression or a bug - your expected behavior however would be. As far as I can see, it was reverted to how it was before. Can you elaborate on what you mean by "this did not happen"?

If there was a regression around elytras, please make a separate report and explain that example in more detail

TeyRine

As I see in the code in 1.21.3 the shouldStopSprinting method was not presented at all and when the bug was fixed this method appeared, that's what I conclude from this that the bug rollback was not fully implemented

Nassim Jahnke

Thank you for your report!
However, this issue is Invalid.

When considering bugs, you need to show their in-game impact and compare it with previous behavior. In this case, the code might look slightly different, but as far as we can see, the behavior is the same and is more of a feature suggestion.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

Avoma

The issue with the elytra is currently being tracked in MC-279688. As for the other two problems, they weren't mentioned within MC-152728 and were filed as separate issues. I think it's logical that you do not maintain your sprint or cannot start sprinting while riding entities and receiving blindness for this reason.

TeyRine

@unknown if the overwing issue was tracked in MC-152728 but MC-152728 fix was reverted, why doesn't it work as in the versions before the fix if the fix was cancelled?

Sebexan

A lot of confusion, but it was more like MC-279688

Dhranios

Yes, Sabexan, except that this report states to glide first, then start sprinting, which was never possible.

TeyRine

My bad, I meant start sprinting and then do all that stuff.

Avoma

I meant MC-279688; my apologies.

TeyRine

(Unassigned)

Unconfirmed

(Unassigned)

25w04a

Retrieved