Skip to content

Fix join crash, blocked resource packs, staff join spam and command prefix - #154

Open
I-No-oNe wants to merge 4 commits into
clickcrystals-development:mainfrom
I-No-oNe:fix/assorted-client-fixes
Open

Fix join crash, blocked resource packs, staff join spam and command prefix#154
I-No-oNe wants to merge 4 commits into
clickcrystals-development:mainfrom
I-No-oNe:fix/assorted-client-fixes

Conversation

@I-No-oNe

@I-No-oNe I-No-oNe commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Bug fix
  • New feature

Description

Four client fixes, one commit each. Replaces #150, #151, #152 and #153.

  • Join crash with no-load-screen - MixinGui cast this to AccessorMinecraftClient, which mixes into Minecraft, so every cancelled screen change threw a ClassCastException inside packet handling and dropped the connection. Now uses mc.gui.setScreen(null). That invoker was its only user, so it is gone.
  • no-server-packs blocked nothing - packs are pushed during the configuration phase, but MixinConnection dropped PacketReceiveEvent while there was no player. The event is now passed anyway and carries the PacketListener, which the module answers the handshake on. GameJoinEvent and EntityDamageEvent keep their player check.
  • Staff join notification spam - servers re-send ADD_PLAYER on tab list refreshes and lobby switches. NetworkEventListener now announces each id once and forgets them on game leave.
  • Custom commands sent as chat - getKeyName ran the prefix through glfwGetKeyName, which renames printable keys after the system keyboard layout. Printable key codes are already their character, so those are returned directly.

Related issues

None open for these.

Checklist:

  • My code follows the style guidelines of ItziSpyder(ImproperIssues).
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.
  • I have joined the ClickCrystals Discord.

MixinGui mix into Gui, but cancelled branch cast this to
AccessorMinecraftClient, which mix into Minecraft. Every cancelled screen
change throw ClassCastException, so joining server with no-load-screen on
kill the connection on level loading screen.

Go through mc.gui.setScreen(null). Invoker for setScreenAndShow now unused,
so drop it.
Server push resource pack during configuration phase. No player then, so
MixinConnection dropped the event and the module saw nothing. Packet event
now fire regardless and carry the listener that got the packet, which exist
in both phases and own the connection the spoofed handshake go back on.
glfwGetKeyName renames printable keys after the active operating system
layout, so the default comma prefix reported itself as whichever letter
the layout puts on that key. Chat compares the prefix against typed
characters, so any command a user wrote with the documented prefix missed
the check and was sent to the server as a public message.

Printable GLFW key codes are the characters themselves, so resolve those
directly and only fall back to glfwGetKeyName for the remaining keys.
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.

1 participant