It is sometimes reffered to as "Strafe fix" or "Motion fix", if you are attacking someone, you are obviously facing them, the problem is that minecraft changes your speed based on the way you are looking so if you are facing the enemy and going forward, you would be faster and than if you went for example backwards or to the side, the problem is that with silent (aka. server-side only) rotations your rotation (and therefore your expected speed) is different on your client and on the server so you need to adapt to that. All decent anticheats have checks for this nowdays, for example: Intave, AAC, Sparky, Buzz, Grim and more. You can change the speed in the method "moveFlying" which is in Entity class in which there is a reference to "rotationYaw" field, you need to create a new field which is equal to rotationYaw but changes to your silent rotations.don't flag movement, what do you mean by that?
I'm just happy to help someone who is actually trying to learn and isn't just mindlessly copy pasting everything, while using "learning" as an excuse.You don't understand how much I appreciate your answer - I will try to implement the things you mentioned.
Could you maybe explain how I could implement the GCD correctly? Currently I am using LiquidBounce's methode but I don't quite understand why it is the way it is.
No worries, take your time and good luck with your PC!I can help you with GCD fix in more detail later but as i currently need to fix some stuff with my PC i won't respond in much detail at the moment
Yeah, pretty much.Alright so for now here is my explanation how I understand GCD.
Since the client is sending his Client Settings via a Packet the anticheat now has got the mouse sens float.
The anticheat now tries to calculate if the rotation sent by the client is possible with the mouse sens.
Using GCD while implementing the Mouse sense into it adjusts the rotation so it becomes possible
Thanks.No worries, take your time and good luck with your PC!
I have a question about that, should setting the player to sprinting = false be enough? Is the movement speed of going forwards faster than going sideways when not sprinting?It is sometimes reffered to as "Strafe fix" or "Motion fix", if you are attacking someone, you are obviously facing them, the problem is that minecraft changes your speed based on the way you are looking so if you are facing the enemy and going forward, you would be faster and than if you went for example backwards or to the side, the problem is that with silent (aka. server-side only) rotations your rotation (and therefore your expected speed) is different on your client and on the server so you need to adapt to that. All decent anticheats have checks for this nowdays, for example: Intave, AAC, Sparky, Buzz, Grim and more. You can change the speed in the method "moveFlying" which is in Entity class in which there is a reference to "rotationYaw" field, you need to create a new field which is equal to rotationYaw but changes to your silent rotations.
No, the movement speed is changing based on your rotation even when you are not sprinting.I have a question about that, should setting the player to sprinting = false be enough?
that makes sense, ig when changing the yaw the player gets slower?No, the movement speed is changing based on your rotation even when you are not sprinting.
When you are looking forward, you will be slower when walking to the side or backwards.that makes sense, ig when changing the yaw the player gets slower?
final float f = mc.gameSettings.mouseSensitivity * 0.6F + 0.2F;
final float gcd = f * f * f * 1.2F;
final float deltaYaw = nextYaw - curYaw;
final float deltaPitch = nextPitch - curPitch;
final float fixedDeltaYaw = deltaYaw - (deltaYaw % gcd), fixedDeltaPitch = deltaPitch - (deltaPitch % gcd);
final float fixedYaw = curYaw + fixedDeltaYaw;
final float fixedPitch = curPitch + fixedDeltaPitch;
Do you really think anyone in the minecraft cheating community cares about a GPL License?So about the GCD Fix you first need to do:
Java:final float f = mc.gameSettings.mouseSensitivity * 0.6F + 0.2F; final float gcd = f * f * f * 1.2F;
(which i assume you have done as you said you have skidded the gcd fix from LB)
You need to do:
Java:final float deltaYaw = nextYaw - curYaw; final float deltaPitch = nextPitch - curPitch; final float fixedDeltaYaw = deltaYaw - (deltaYaw % gcd), fixedDeltaPitch = deltaPitch - (deltaPitch % gcd); final float fixedYaw = curYaw + fixedDeltaYaw; final float fixedPitch = curPitch + fixedDeltaPitch;
So, what this does is creat deltaYaw and deltaPitch which are, as you can see basically the difference between your desired rotation and your current rotation. To apply the gcd fix you need substract "modulo" (i don't really know how to say it properly) delta and gcd from delta and then add the fixed delta to your current rotation. The reason it is how it is is because minecraft uses the same process to apply sensitivity to your mouse movement.
A common mistake is "applying" the gcd directly to yaw and pitch, which is sometimes reffered to as fake gcd, which you can theoretically do, but keep in mind that most modern anticheats can detect it pretty quickly.
BTW: Reminder that if you continue to use the GCD fix code from LB or use any other code from them, you need to make your client open-source to comply with the GPL 3.0 license.
That's a good argument, but after literally copy pastring any decent person would do it if it was GPL or not, and i believe this guy isn't just a retarded skid.Do you really think anyone in the minecraft cheating community cares about a GPL License?
I already removed the code and tried to implement the code based off Minecrafts code.BTW: Reminder that if you continue to use the GCD fix code from LB or use any other code from them, you need to make your client open-source to comply with the GPL 3.0 license.
I found the code you referred to in the Mouse.java class, where it does call the Entity#changeLookDirection(double cursorDeltaX, double cursorDeltaY) methode. (Fabric 1.19 btw)also dont use modulo, modulo is a bad way to fix your gcd, look at EntityRender.java where the angles get set (also look at setAngles) and just implement that for your rotations
Can I ask why is that? Is the performance worse?also dont use modulo, modulo is a bad way to fix your gcd
I really think creating open source projects helps out the development of any project - so yea if at any point I will use licensed code, I will make my client open source.That's a good argument, but after literally copy pastring any decent person would do it if it was GPL or not, and i believe this guy isn't just a retarded skid.
<3and i believe this guy isn't just a retarded skid.
I have implemented the motion fix, but it feels kinda weird. I understand that the movement needs to be adjusted, but is there a good way to do that?It is sometimes reffered to as "Strafe fix" or "Motion fix", if you are attacking someone, you are obviously facing them, the problem is that minecraft changes your speed based on the way you are looking so if you are facing the enemy and going forward, you would be faster and than if you went for example backwards or to the side, the problem is that with silent (aka. server-side only) rotations your rotation (and therefore your expected speed) is different on your client and on the server so you need to adapt to that. All decent anticheats have checks for this nowdays, for example: Intave, AAC, Sparky, Buzz, Grim and more. You can change the speed in the method "moveFlying" which is in Entity class in which there is a reference to "rotationYaw" field, you need to create a new field which is equal to rotationYaw but changes to your silent rotations.
I am not sure if i understand your question, you should be able to use WASD (to some extent) while still strafing around the entity, and if you are asking if you should implement the movement fix to your velocity too, then yes.I have implemented the motion fix, but it feels kinda weird. I understand that the movement needs to be adjusted, but is there a good way to do that?
Currently I strafe around the entity, because the velocity is adjusted to my yaw. Should I adjust the velocity too, so the player still can use WASD like it is without the move fix?
I am not sure if i understand your question, you should be able to use WASD (to some extent) while still strafing around the entity, and if you are asking if you should implement the movement fix to your velocity too, then yes.