-
Bug
-
Resolution: Unresolved
-
None
-
21w11a, 21w13a, 21w14a, 21w15a, 21w16a, 21w17a, 21w18a, 21w19a, 21w20a, 1.17 Pre-release 1, 1.17 Pre-release 3, 1.17 Pre-release 4, 1.17 Pre-release 5, 1.17 Release Candidate 1, 1.17 Release Candidate 2, 1.17, 1.17.1 Pre-release 1, 1.17.1 Pre-release 2, 1.17.1 Release Candidate 1, 1.17.1, 21w37a, 21w40a, 21w43a, 1.18, 1.18.1, 22w05a, 1.18.2, 1.19, 1.19.2, 22w43a, 1.19.3, 1.19.4, 1.20.1, 1.20.4, 23w51b, 1.21, 1.21.3
-
None
-
Community Consensus
-
Accessibility, Player
-
Normal
-
Platform
The Bug:
Your field of view and movement speed instantly change back to their default states while airborne with the freezing effect.
Steps to Reproduce:
- Stand inside of some powder snow and wait until the freezing overlay covers your screen.
- Exit the powder snow and jump constantly.
- Take note as to whether or not your field of view and movement speed instantly change back to their default states while airborne with the freezing effect.
Observed Behavior:
Your field of view and movement speed instantly change back to their default states.
Expected Behavior:
Your field of view and movement speed would not instantly change back to their default states.
Code Analysis:
Code analysis by Avoma can be found below.
The following is based on a decompiled version of Minecraft 1.18.1 using MCP-Reborn.
public abstract class LivingEntity extends Entity { ... protected void tryAddFrost() { if (!this.getBlockStateOn().isAir()) { int i = this.getTicksFrozen(); if (i > 0) { AttributeInstance attributeinstance = this.getAttribute(Attributes.MOVEMENT_SPEED); if (attributeinstance == null) { return; } float f = -0.05F * this.getPercentFrozen(); attributeinstance.addTransientModifier(new AttributeModifier(SPEED_MODIFIER_POWDER_SNOW_UUID, "Powder snow slow", (double)f, AttributeModifier.Operation.ADDITION)); } } } ...
If we look at the above class, we can see that the code specifically checks to see whether or not the player has air below their feet (is airborne) before changing their field of view and movement speed whilst freezing. This is evident through the following line of code:
if (!this.getBlockStateOn().isAir())
This basically means that if the player is airborne whilst freezing, their field of view and movement speed would instantly change back to their default states.