-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Interpolated Looking implementation #4505
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
base: 1.19.4
Are you sure you want to change the base?
Conversation
Replaced old, in many cases not working "smoothlook" with "interpolatedLook", which forces global player rotation in both axis to follow a "path" from source looking position(rotation) to target, removing jittering when, for instance, mining blocks; it WILL hinder baritone's default mining speed, but the main purpose is to make actions seem slightly more humanly possible, time of the interpolation is controlled by interpolatedLookLength, in ticks.
8mb.video-4EL-9Jlk4hg4.mp4"showcase" video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use google guidelines rn & dont commit the commented code
@@ -120,4 +121,8 @@ public static double entityDistanceToCenter(Entity entity, BlockPos pos) { | |||
public static double entityFlatDistanceToCenter(Entity entity, BlockPos pos) { | |||
return distanceToCenter(pos, entity.position().x, pos.getY() + 0.5, entity.position().z); | |||
} | |||
|
|||
public static Vec3 vDivide (Vec3 A, Vec3 B) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use google codestyle guidelines plz
if (this.target.mode == Target.Mode.SERVER) { | ||
ctx.player().setYRot(this.prevRotation.getYaw()); | ||
ctx.player().setXRot(this.prevRotation.getPitch()); | ||
}// else if (ctx.player().isFallFlying() && Baritone.settings().elytraSmoothLook.value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is it? 💀. Commits the commented code is pretty bullshit
The interpolation is very cool, but given how abysmally slow the speed is you might want to 'boost' remainWithExistingLookDirection so it REALLY prefers to mine blocks in the existing look direction, to minimize turning. It looks more human anyway Or add some sort of penalty setting for it at least? |
Actually, having played around with this a bit, it's real nice. MUCH better and FASTER somehow than smoothlook, just have to nerf the ticks. It's nice! |
hey can you help me to compile with this changes? idk why it doesnt work when i do it :( im new in all this things |
how can i use your modification mod. btw it looks really good and smooth |
hey i really like your mod how can i use it? is there a .jar file which i can use? |
how did you use it? im new to github an all this so i dont have a clue. is there like a .jar file or anything i would really like to use the showcased mod |
Kind of a miracle I got it working. You need to download their repo as a
folder or something and compile it into a jar yourself. It was rough but
there should be a guide or two online
…On Tue, Apr 15, 2025 at 4:22 AM weedforspeeed ***@***.***> wrote:
Actually, having played around with this a bit, it's real nice. MUCH
better and FASTER somehow than smoothlook, just have to nerf the ticks.
It's nice!
how did you use it? im new to github an all this so i dont have a clue. is
there like a .jar file or anything i would really like to use the showcased
mod
—
Reply to this email directly, view it on GitHub
<#4505 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZXNHPAMVVOJOIKW5MCX4L2ZTFUJAVCNFSM6AAAAABOQ3RWWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBUGQYDENJSGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
*weedforspeeed* left a comment (cabaletta/baritone#4505)
<#4505 (comment)>
Actually, having played around with this a bit, it's real nice. MUCH
better and FASTER somehow than smoothlook, just have to nerf the ticks.
It's nice!
how did you use it? im new to github an all this so i dont have a clue. is
there like a .jar file or anything i would really like to use the showcased
mod
—
Reply to this email directly, view it on GitHub
<#4505 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZXNHPAMVVOJOIKW5MCX4L2ZTFUJAVCNFSM6AAAAABOQ3RWWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMBUGQYDENJSGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
alright thank you bro imma try it out. but wouldnt it be possible that you could send me the jar file? |
I lost the file sadly and I dunno how to remake it, you’re on your own
…On Thu, Apr 17, 2025 at 1:37 PM weedforspeeed ***@***.***> wrote:
alright thank you bro imma try it out. but wouldnt it be possible that you
could send me the jar file?
—
Reply to this email directly, view it on GitHub
<#4505 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZXNHPTLJO235DCXV76E232Z7YFHAVCNFSM6AAAAABOQ3RWWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJTG42DONBVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
*weedforspeeed* left a comment (cabaletta/baritone#4505)
<#4505 (comment)>
alright thank you bro imma try it out. but wouldnt it be possible that you
could send me the jar file?
—
Reply to this email directly, view it on GitHub
<#4505 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACZXNHPTLJO235DCXV76E232Z7YFHAVCNFSM6AAAAABOQ3RWWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJTG42DONBVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
alright still thank you for the advice |
im not able to do it :( |
alright i made it to make the .jar file but which one to use that it works like in the video fabric or forge and the "unoptimized" one or the other one? because its still laggy with interpolated look |
and which version to use? |
Hey there, it's been a while, i have been kinda occupied with work (not coding related sadly) hence i haven't been able to correct the pr for coding guidelines. As for this, you should be able to use the normal or obfuscated version, the unoptimized version is only for debugging, but the function should be fully implemented on all jar types Also, i made this pr for, at it's moment, the main branch, 1.19, should work best there, but could work for other versions as well, but would need some precisions Also yes, it may look laggy because it is based on tick updates rather than frame updates; most of baritone works on that same 20 TPS refresh rate, may have not been noticeable before as movement took less than one frame, implementing this in a way that updates frame per frame is possible, however would require mixin work, which i'm not precisely familiar with, however, upon doing playtesting, the main arc calculation function, which is the heaviest part of the pr, took near 10 ms, which again means it's entirely plausible to update it on a frame per frame basis |
hey glad youre back so i got your version and im playing 1.19.4 fabric and i just the standalone fabric .jar file in the mods folder but eventho i got a good pc its not nearly as smooth as in your video. what could possibly be wrong? |
okoka_compressed.mp4this is how it looks on my end |
I see, i believe you are referring to the pauses between each mined block This is indeed something that tends to happen often, and basically it's because the interpolation is run always. My function is directly called by baritone, since it was designed to have intant movement, it checks every single tick for moving the camera to point at the block However, when that point is reached, the override no longer applies, and baritone attempts to call the looking function again, so if the block hasn't yet been mined, the arc will be calculated for the same point, running the cycle for the same point (hence why it looks static) In that case, it does hinder speed a bit due to those pauses, things that could reduce it would be to lower the interpolation ticks A more permanent solution is to know when the block has been successfully mined by the player, but once again, it involves non-implemented mixins, and as i'm still in a (slightly horrible) job, i haven't had time to explore mixins as well as implementing the solution for this |
So yes, it's working without lag issues (not performance problem) but the same interpolation gets in the way if mining a block takes too little time or too much time |
If it was a performance issue, all minecraft would stop, otherwise it would generate frames at a slowe rate or directly freeze, just need to figure out a way for baritone to see the block itself instead of a position, and know when it hasn't/has been mined |
i mean like the camera movement is more "laggy" than in your video. how can i make it buttersmooth like you? |
and i somehow keep looking at the bottom when im walking |
Oh yeah, i see what you mean, but in the showcase it's also pretty jittery, because the movement is only called 20 times per second instead of 60, as it depends on the world's tick, just as most of Baritone, thing is that it's less noticeable because the video is heavily compressed and running at 30 fps, as at the moment I didn't have enough space
and not sure what you mean, do you perchance have a video showcasing this as well? |
unfortunatly, i cant put any videos in here that are anylonger than 10 sec. "and i somehow keep looking at the bottom when im walking" i think this is just something that happens sometimes with baritone. and what i also noticed #interpolatedlook sets itsself during the programm to false. but dont get me wrong youre programm is great and i think the only one who makes baritone a little smoother |
when you make for example #goto 1 1 1 #interpolatedlook goes automaticly to false after that |
but i dont know how i can fix that jittery look it doesnt look jittery in your video |
Replaced old, in many cases not working "smoothlook" with "interpolatedLook", which forces global player rotation in both axis to follow a "path" from source looking position(rotation) to target, removing jittering when, for instance, mining blocks; it WILL hinder baritone's default mining speed, but the main purpose is to make actions seem slightly more humanly possible, time of the interpolation is controlled by interpolatedLookLength, in ticks.