Skip to content

fix: hand crank rotation visuals #8828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: mc1.20.1/dev
Choose a base branch
from

Conversation

nopeless
Copy link

@nopeless nopeless commented Jul 1, 2025

The visuals in handcrank don't match the actual rotation. This was caused by not applying proper degrees to radians in rendering. The commit applys them.

Angle semantics for HandCrankBlockEntity stay as degrees

Before:

javaw_gBuJkGtgtT.mp4

After:

java_DMwvxopO5F.mp4

I also modified convertToAngular(float speed) function to better explain where the magic 3 / 10f conversion value comes from (let me know if you want it removed)

TL;DR: codebase mixed degrees and radians and also had a wrong conversion formula in the middle. The resolution taken is only using degrees for getIndependentAngle()/independentAngle and converting them to radians at render time

@vercte vercte added area: rendering Issue or PR is related to rendering pr type: fix PR fixes a bug labels Jul 1, 2025
@nopeless nopeless changed the title fix: hand crank rotation visuals [WIP] fix: hand crank rotation visuals Jul 1, 2025
@nopeless
Copy link
Author

nopeless commented Jul 1, 2025

Give me a second somehow I forgot to patch copper valve visuals properly

@nopeless
Copy link
Author

nopeless commented Jul 1, 2025

java_VAfXRXfKCO.mp4

@nopeless nopeless changed the title [WIP] fix: hand crank rotation visuals fix: hand crank rotation visuals Jul 1, 2025
@VoidLeech VoidLeech added the pr status: wrong target PR is targeting the wrong branch label Jul 1, 2025
Copy link
Contributor

github-actions bot commented Jul 1, 2025

@nopeless, this pull request is targeting the wrong branch. Pull requests should target the branch corresponding to the earliest supported Minecraft version unless the changes are specific to code that only exists for a newer Minecraft version. Please change the target branch, resolve any merge conflicts, and leave a message here so we can continue with the process of reviewing and merging this pull request. Thanks!

@nopeless nopeless force-pushed the fix-handcrank-visual branch from 27b93b4 to 8cb5abd Compare July 2, 2025 08:56
@nopeless nopeless changed the base branch from mc1.21.1/dev to mc1.20.1/dev July 2, 2025 08:56
@nopeless
Copy link
Author

nopeless commented Jul 2, 2025

commits have been squashed and rebased to 1.20.1/dev

@VoidLeech VoidLeech removed the pr status: wrong target PR is targeting the wrong branch label Jul 2, 2025
@souldbminersmwc
Copy link

Amazing PR. This has always bothered me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: rendering Issue or PR is related to rendering pr type: fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants