USE_ITEM Entity ID is higher than expected.
IllusionTheDev opened this issue ยท 3 comments
Describe the bug
USE_ITEM entity ID unexpected value
To Reproduce
Steps to reproduce the behavior:
- Spawn a Fake Entity using packets (I used an armor-stand with entity id 10,000)
- Register a listener for the USE_ENTITY packet
- Click on the armor stand
- Read the values of the USE_ENTITY packet (entityId resulted in 100,000, instead of 10,000)
Expected behavior
The read entity ID should be the same as the spawned entity ID
Version Info
https://pastebin.com/sHYJaTHa
Additional context
Unsure if this is caused by a high entity ID, or if it's just me doing something wrong. Using an entity-id of 10,001 returns 100,001.
Tested on Paper 1.16.5
I tried isolating the content and debugging on a separate test server and it works correctly somehow.
After that, I tried debugging on the original server and it works correctly? I'm not sure what happened.
Here's the code, you can close the issue if you want:
https://gist.github.com/IllusionTheDev/883eb3aa8b7c6d4b849f9a9eed145dc1
I suspect the issue was caused because I was using wrapped metadata packets, but debugging on the original server couldn't prove it.