Issue with negative map ids #14
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
incompatibility
invalid
needs confirmation
needs more info
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: SBDevelopment/MapReflectionAPI#14
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hello,
I've noticed that you're negating negative map ids when a map packet is sent and I'm wondering why exactly you're doing that. Is there a specific reason for that? It's breaking other plugins and potentially Vanilla behavior as well.
https://github.com/SBDPlugins/MapReflectionAPI/blob/master/src/main/java/tech/sbdevelopment/mapreflectionapi/listeners/PacketListener.java#L68-L71
Thank you!
That's done to detect map ids created by MapReflectionAPI. In the packet listener, the event is called and the number is swapped again (negative to positive).
That unfortunately breaks other plugins that also use negative map ids. Is the negative -> positive conversion needed? The Minecraft client will accept negative ids, that shouldn't be a problem.
Do you have some example plugins broken?
I only have one example: cerus/maps.
maps also uses negative ids for clientside maps. The id counter starts at Integer.MIN_VALUE and counts up whenever a new clientside map is created. The map id is also used to send item frame packets that contain these maps. Changing the id will make the maps appear without any drawings to the client, because the item frame packets still contain the negative id.
I see. This plugin is a fork, so I have to look into that further to see what's the exact reason it's used.
I appreciate the help, let me know if you need anything else