Tweakeroo

Tweakeroo

2M Downloads

Sending impossible HeldItemSlot Packets

freppp opened this issue ยท 5 comments

commented

Hi, anticheat developer here.

I don't know exactly what module in this mod is causing these packets to be sent, but it is causing the client to send held item slot packets consecutively with the same slot id (which is not possible on the vanilla client)

Here is an example of the check that is being flagged on mine as well as other anticheats: https://github.com/ElevatedDev/Frequency/blob/4618dd8a2831512d86ec1808cd467f51b173e567/src/main/java/xyz/elevated/frequency/check/impl/badpackets/BadPacketsF.java#L11

Hopefully this can be fixed, thanks

commented

Do you know the Yarn name of the packet class or the methods which send the packet? Or when exactly is this packet sent in vanilla? And is it sent many times per tick with Tweakeroo or just when vanilla sends it it has the wrong/same value? Is this just the packet that informs the server when the client changes the selected hotbar slot?

commented

Its PacketPlayInHeldItemSlot, I'm not familiar with where it is sent exactly in Yarn, but yes it is sent whenever the client changes its held item slot packet. Obviously the vanilla client would never send consecutive held item slot packets with duplicate ID's since there would be no reason to send the packet if the user did not change their held item slot. I don't know exactly what in Tweakeroo causes this extra packet to be sent, just that several users of my resource have contacted me regarding users flagging for bad packets and have ruled this to be the cause.

If there is anything else I can do to help let me know, thanks for the quick response.

commented

I was inspecting the code quick, I'm not entirely sure if it's mistakenly sending packets with the logic flow, but they are tied to the Client onTick() when you have " TWEAK_REPAIR_MODE " enabled, and I see the packets being sent via the InventoryUtils -> swapItemToHand() and the swapToolToHand() methods.

Those are basically the "Hot Swap / Restock" and "Tool Auto swapping" should be calling to do the actual item / tool swaps -- but they shouldn't be getting sent every tick, in theory...

So, what Packet I am seeing under Yarn, is called " UpdateSelectedSlotC2SPacket ".

I can open up some debugging tools on these functions to see how often they are getting sent, and if the logic is correct.

commented

Minecraft also sends "ClickSlotC2SPacket" packet every time you do a mc.interactionManager.clickSlot() .
But overall under 1.20.5 I am not seeing the behavior that you are describing. Perhaps its under older code, since the Repo that you linked here, was last updated around 2 years ago, I can't imagine that your using 1.20.4 for example.

commented

Minecraft also sends "ClickSlotC2SPacket" packet every time you do a mc.interactionManager.clickSlot() .

But overall under 1.20.5 I am not seeing the behavior that you are describing. Perhaps its under older code, since the Repo that you linked here, was last updated around 2 years ago, I can't imagine that your using 1.20.4 for example.

Several thousand servers that use my plugin are on 1.20.4 with clients on the latest versions using Tweakeroo and I have had several reports of this, it is an issue