Skip to content

[VirtualInput] Add cursor interpolation #253

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

Merged
merged 9 commits into from
Jul 18, 2025

Conversation

ScribbleTAS
Copy link
Member

@ScribbleTAS ScribbleTAS commented Jun 7, 2025

My original plan was to fix #251 but it somehow evolved into a bit of a rework of interpolation as a whole...

Cursor Interpolation

When using TASmod, you may have noticed the cursor in gui screens being really laggy or just jumping around.
This was due to the cursor only being played at 20tps. And with the introduction of subticks in the TASfile,
I also have the information to make mouse cursor intorpolation work in addition to the camera interpolation I added in #179

Changes

  • Moved Camera- and Cursor-Interpolation to the new VirtualInterpolationHandler
  • [InfoHud] Fixed Green and White keystrokes being the same during playback. Green should be one tick ahead
  • Fixed JUnit not behaving >:(
  • Fixes [Playback] Scroll bar in creative tab sometimes desyncs #251
  • [Events] Changed event handler to not update the return value if it is null
  • [InfoHud] Re-enabled cursor display
  • Switch from the Triple class to it's own custom class
  • [PlaybackController] Add playbackNext keyboard, mouse and camera angle, to have fields that look ahead one tick
  • [PlaybackController] Rename keyboard mouse and cameraangle field to prepend currentPlayback

This implementation is technically not correct and will be fixed once a rewrite of the VirtualInput#VirtualMouseInput is done
@ScribbleTAS ScribbleTAS added this to the Beta1 milestone Jun 7, 2025
@ScribbleTAS ScribbleTAS self-assigned this Jun 7, 2025
@ScribbleTAS ScribbleTAS added Core Issue relates to core concepts Gui Issue relates to guis labels Jun 7, 2025
@github-project-automation github-project-automation bot moved this to Todo in TASmod Jun 7, 2025
@ScribbleTAS ScribbleTAS moved this from Todo to In Progress in TASmod Jul 16, 2025
@ScribbleTAS ScribbleTAS changed the title [VirtualInput] Patch vanilla getX() functions in EntityRenderer [VirtualInput] Add cursor interpolation Jul 18, 2025
@ScribbleTAS ScribbleTAS marked this pull request as ready for review July 18, 2025 21:20
@ScribbleTAS ScribbleTAS requested a review from PancakeTAS July 18, 2025 21:20
@ScribbleTAS ScribbleTAS merged commit d14da99 into MinecraftTAS:develop Jul 18, 2025
3 checks passed
@ScribbleTAS ScribbleTAS deleted the fix/drawMouse branch July 18, 2025 22:36
@github-project-automation github-project-automation bot moved this from In Progress to Done in TASmod Jul 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Issue relates to core concepts Gui Issue relates to guis
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Playback] Scroll bar in creative tab sometimes desyncs
2 participants