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

修复与最新版minihud不兼容 #82

Merged
merged 8 commits into from
Nov 12, 2024

Conversation

Crystal0404
Copy link
Contributor

@Crystal0404 Crystal0404 commented Nov 12, 2024

fix #79

造成兼容问题原因

minihud更改了原this.getTargetedBlockEntity()的返回类型, 现在它不再返回BlockEntity, 而是返回Pair<BlockEntity, NbtCompound>包装, 因此mixin注入失败引发崩溃

修复

调整注入目标的返回值更改为正确的Lcom/llamalad7/mixinextras/lib/apache/commons/tuple/Pair;即可, 使用getLeft()方法即可从中获取BlockEntity

同步蜜蜂数量可以正常工作
2024-11-12_22 16 42

另: curseforge上相关mod未更新, 因此使用来自jitpack的构建(malilib, minihud).

(modrinth上相关mod已更新, 或许可以使用modrinth maven替换curse maven?)

@Crystal0404 Crystal0404 changed the title 修复与最新版迷你、 修复与最新版minihud不兼容 Nov 12, 2024
@Fallen-Breath
Copy link
Owner

请阐述新增/修改代码的实现依据,包括但不限于:

  • 源代码有什么问题,注入处的什么变更导致了相关 issue
  • 新代码如何解决此问题
  • 为何选择此实现

而非直接无依无据地提供一份代码并请求合并

除此之外,形如“malilib需自行将模组放入mods文件”的依赖应用方式是不可接受的,这会让此项目的环境初始化不再有稳定的可复现性。请正确地使用 maven 声明依赖。若不确定该如何引用非 curseforge 的依赖,可以直接提出

@vocaloidkiss
Copy link

赞👍

@Crystal0404
Copy link
Contributor Author

修改完成, 现malilib与minihud均来自jitpack

@Fallen-Breath
Copy link
Owner

如果仅仅是改了个 @At 目标的返回值的话,建议直接在 me.fallenbreath.tweakermore.mixins.tweaks.mod_tweaks.serverDataSyncer.minihud.RenderHandlerMixin 上改,没必要单独开个文件

Copy link
Owner

@Fallen-Breath Fallen-Breath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,感谢帮忙

@Fallen-Breath Fallen-Breath merged commit 72b6b91 into Fallen-Breath:master Nov 12, 2024
2 checks passed
@Crystal0404 Crystal0404 deleted the minihud branch November 13, 2024 14:47
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.

Game crashes with the latest minihud from sakura / 0.32.51
3 participants