Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display inconsistency fix #200

Closed
wants to merge 2 commits into from

Conversation

MillionthOdin16
Copy link
Contributor

@MillionthOdin16 MillionthOdin16 commented Sep 26, 2022

@WillFP
Finally found source of display bug that causes enchants to not appear and armor tiers to display as %tier%. Usually the PacketWindowItems onSend is called once per event, but sometimes it's called an additional 3 times with the windowId set to 0. This infrequent case caused the display to break because player.lastDisplayFrame was not set to empty during those additional calls. I also fixed a packet type that I think you intended to use in PacketHeldWindowItems.

I've tested this on 1.19.2 with displayframes set to true, and it works without any issues that I can see. Small bug XD

This should resolve Auxilor/EcoEnchants#299 and resolve Auxilor/EcoEnchants#303

Let me know if you want me to get any more debug info

@MillionthOdin16
Copy link
Contributor Author

Just fyi. I just saw a console error for the HeldItemSlot packet. I'm about to goto bed so I'll look at it tomorrow. I didn't run into any in game issues, but error not good. You prob know how to fix anyways. This packet was sent on player join

com.comphenix.protocol.reflect.FieldAccessException: Field index 0 is out of bounds for length 0
        at com.comphenix.protocol.reflect.FieldAccessException.fromFormat(FieldAccessException.java:49) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.reflect.StructureModifier.read(StructureModifier.java:218) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.reflect.StructureModifier.modify(StructureModifier.java:320) ~[ProtocolLib.jar:?]
        at com.willfp.eco.internal.spigot.display.PacketHeldWindowItems.onSend(PacketHeldWindowItems.kt:19) ~[eco-6.41.1-all.jar:?]
        at com.willfp.eco.core.AbstractPacketAdapter.onPacketSending(AbstractPacketAdapter.java:119) ~[eco-6.41.1-all.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokeSendingListener(SortedPacketListenerList.java:195) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.SortedPacketListenerList.invokePacketSending(SortedPacketListenerList.java:149) ~[ProtocolLib.jar:?]
        at com.comphenix.protocol.injector.PacketFilterManager.postPacketToListeners(PacketFilterManager.java:547) ~[ProtocolLib.jar:?]```

@WillFP WillFP closed this Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing "Lore" Items losing enchant visibility
2 participants