Ad Astra

Ad Astra

19M Downloads

[Bug]: Zero G favors axis aligned movement

Kevadroz opened this issue ยท 2 comments

commented

Bug Description

When on space stations, any attempt to move while running in a non-cardinal direction will result in perceptibly the same speed as moving while not running, while running while facing a cardinal axis will result in a considerable speed gain.

How to Reproduce?

  1. Get into a zero g environment (space station).
  2. Relocate yourself to a space without any blocks to walk on.
  3. Attempt to run diagonally.

Expected Behavior

Running while facing a non-cardinal direction results in moving at the same speed as running in a cardinal direction.

Version

1.15.18

Mod Loader Version

1.20.1 - 47.3.10

Mod Loader

Forge

Logs or additional context

No relevant logs. However from my own debugging I have deduced that this could be a symptom of MC-184530.

Code of Conduct

  • I have searched the issue tracker and confirmed that the issue has not been reported
  • I have checked the FAQ (if one is present) and my issue is not listed
  • I have verified that I am using the latest version of the mod
  • I have verified that I have installed all the required dependencies for the mod
  • I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
commented

After a bit more debugging I have found the cause of this bug: a bit of code in LivingEntity#aiStep just before the Entity#setDeltaMovement zeroes the motion if it's below a certain value. But this is done individually with x, y and z. causing this problem.

commented

After creating a mixin to lower the minimum speed an entity can have I have also discovered that this bug makes walking have a significant lower speed than intended, moving at a constant 0.001~ blocks per (tick? second?) instead of the slow acceleration that exists with this mixin applied.