-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Hello,
It seems that in Minecraft 1.21, the activateItem function no longer works. After debugging, the issue appears to be that the use_item packet definition in the current protodef/minecraft-data has not been updated to match the 1.21 protocol.
Specifically:
Older versions used rotation: vec2f (x, y),
1.21 officially requires yaw: float and pitch: float as separate fields.
As a result, sending yaw/pitch causes serialization errors like SizeOf error for undefined.
The old rotation field no longer works correctly on 1.21 servers.
Steps to reproduce:
Use bot.activateItem() or send use_item packet on a 1.21 server.
Observe that the action does not trigger server-side interactions.
Check console for serialization errors.
Expected behavior:
activateItem should correctly send a use_item packet compatible with 1.21 servers.

