Repository navigation
fix: 为 Kotlin 2 在 1.8.9 上补齐 EntityPlayerSP.getGameProfile 访问器 - #26
Merged
Merged
Conversation
…uction jar Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
GuiChat closes the screen after sendChatMessage returns, which dismissed the GUI immediately when opened from .music gui or on module enable. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Remove embedded Phosphor mixins and lighting engine so users can install Phosphor separately if desired without mixin conflicts. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent GuiChat from closing the screen after client commands so the MusicPlayer GUI is not dismissed immediately after opening. Co-authored-by: Cursor <cursoragent@cursor.com>
Kotlin 2 compiles blockPos.x to getX(), which does not exist on MC 1.8.9 Vec3i/BlockPos and caused NoSuchMethodError during block collision ticks. Co-authored-by: Cursor <cursoragent@cursor.com>
Kotlin 2 emits direct getGameProfile() calls on EntityPlayerSP, which crashes at runtime; expose gameProfile via access transformer and a mixin accessor, and compare players by UUID in SilentHotbar. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
摘要
thePlayer.gameProfile编译为EntityPlayerSP.getGameProfile()直接调用,导致 MC 1.8.9 运行时崩溃的问题EntityPlayerSP注入@Unique getGameProfile(),在MixinEntityPlayershadowgameProfile字段,并通过 Access Transformer 公开该字段MixinInventoryPlayer改用 UUID 判断本地玩家,替代 GameProfile 比较原因
Kotlin 2 会在具体类型上生成直接方法调用,而 MC 1.8.9 只在
EntityPlayer上声明getGameProfile(),且gameProfile为 private 字段。不修复会导致单人世界保存崩溃、鼠标指向实体时 IllegalAccessError。关联提交:#c3975da(Vec3i getX/getY/getZ 访问器,同类 Kotlin 2 兼容问题)
测试计划
.music gui等客户端命令仍可正常使用