zeroeightysix / KAMI

Minecraft utility mod aimed at anarchy servers
Other
243 stars 73 forks source link

CrystalAura rotation spoofing overwrites any sent rotation packets #158

Open nothub opened 4 years ago

nothub commented 4 years ago

Describe the bug CrystalAura rotation spoofing overwrites any sent rotation packets. This wasnt really a problem in the past and just introduced a rare cornercase bug, where rotation packets sent by Scaffolds faceVectorPacketInstant(Vec3d vec) method were manipulated while the caura was actively attacking a target.

Other modules like AutoFeetPlace and Auto32k also have the ability to send rotation packets.

Possible Solution A utility to manage this in a centralized manner.

Additional context Discord Conversation:

[23:31] hub: oh i think i found a bug that was a rare cornercase bug once but isnt really anymore
[23:31] Bella: lol
[23:31] hub: when caura is active and attacking an enemy, its rewriting outgoing rotation packets.
when you use scaffold or smthg that places blocks and sends rotation packets, it will rewrite these too
[23:32] hub: so when caura is active and afp sends rotation packets, it will be the wrong angles
[23:32] hub: is this correct or am i dumb right now
[23:32] Bella: wait that makes sense
[23:33] hub: i havent tested this but it sounds plausible
[23:33] cookiedragon234: needs a rotation manager like forgehax
[23:34] cookiedragon234: to centrally control all rotations
x4e commented 4 years ago

Also by centrally storing all rotations etc its easier to make legit aim smoothing, reduce packet spam (less unnecessary packets from every single module) and also allows modules to accurately get the players rotation both server side and client side for stuff like predicting directories, which obviously you will want to use server rotations for rather than client rotations.