ghen-git / Thirst-Mod

Other
13 stars 10 forks source link

1.20.1 #59

Closed Xing-C closed 9 months ago

Xing-C commented 9 months ago

Add compatibility with module CSSB, modify rendering logic

Xing-C commented 9 months ago

意志坚定模组更新了,当前引用的意志坚定在跳入岩浆死亡会崩溃

Xing-C commented 9 months ago

@mlus-asuka @ghen-git

mlus-asuka commented 9 months ago

意志坚定模组更新了,当前引用的意志坚定在跳入岩浆死亡会崩溃

应该不影响Thirst兼容吧。

mlus-asuka commented 9 months ago

这个classic and simple status bars是不是你自己写的mod。我建议你要做兼容的话在自己的mod里mixin会好一点。因为你这边光禁用也没有给新的渲染方案。

Xing-C commented 9 months ago

是我自己写的模组,但是我属于新手.. 一开始用改写发现是静态改不了又不会用mixin(没了解过),这样改不会影响Thirst兼容 ,修改只是在classic and simple status bars存在的时候不进行渲染。 我的模组会联动Thirst进行渲染饥渴/水分程度,所以不需要Thirst同时渲染. classic and simple status bars这个模组作用是提供一个新的状态栏.

Xing-C commented 9 months ago

这个classic and simple status bars是不是你自己写的mod。我建议你要做兼容的话在自己的mod里mixin会好一点。因为你这边光禁用也没有给新的渲染方案。

请问有机会通过嘛,如果不行我就尝试其他办法...😥

mlus-asuka commented 9 months ago

这个classic and simple status bars是不是你自己写的mod。我建议你要做兼容的话在自己的mod里mixin会好一点。因为你这边光禁用也没有给新的渲染方案。

请问有机会通过嘛,如果不行我就尝试其他办法...😥

这个仓库我没有权限。ghen最近挺忙的应该,而且最近应该没有更新计划。如果他没意见的话下次更新我会顺便加上你的代码

Xing-C commented 9 months ago

这个classic and simple status bars是不是你自己写的mod。我建议你要做兼容的话在自己的mod里mixin会好一点。因为你这边光禁用也没有给新的渲染方案。

请问有机会通过嘛,如果不行我就尝试其他办法...😥

这个仓库我没有权限。ghen最近挺忙的应该,而且最近应该没有更新计划。如果他没意见的话下次更新我会顺便加上你的代码

尝试了mixin,现在还在试... 完全不会用

mlus-asuka commented 9 months ago

帮你写好了,直接取消渲染事件就可以了。mixin环境自己配一下。

Xing-C commented 9 months ago

太感谢了,原来可以取消...

Xing-C commented 9 months ago

那你就注入renderThirstOverlay 把这个方法取消了就行

Unable to locate obfuscation mapping for @Inject target onRenderGuiOverlayPre @Inject(method = "onRenderGuiOverlayPre", at = @At("HEAD"), cancellable = true)

报错了... emmm

mlus-asuka commented 9 months ago

那你就注入renderThirstOverlay 把这个方法取消了就行

Unable to locate obfuscation mapping for @Inject target onRenderGuiOverlayPre @Inject(method = "onRenderGuiOverlayPre", at = @at("HEAD"), cancellable = true)

报错了... emmm

你需要声明remap=false

Xing-C commented 9 months ago

那你就注入renderThirstOverlay 把这个方法取消了就行

Unable to locate obfuscation mapping for @Inject target onRenderGuiOverlayPre @Inject(method = "onRenderGuiOverlayPre", at = @at("HEAD"), cancellable = true) 报错了... emmm

你需要声明remap=false

放在哪呢.... 我试着放进mixin {} 不行

mlus-asuka commented 9 months ago
@Mixin(value = HUDOverlayHandler.class,remap = false)
public class MixinHUDOverlayHandler {
        @Inject(method = "onRenderGuiOverlayPre", at = @At("HEAD"), cancellable = true)
        private static void onRenderExhaustion(CallbackInfo ci) {
            ci.cancel();
        }
        @Inject(method = "renderThirstOverlay", at = @At("HEAD"), cancellable = true)
        private static void onRenderGuiOverlay(CallbackInfo ci) {
            ci.cancel();
        }
}
Xing-C commented 9 months ago

🤤 onRenderGuiOverlayPre不是静态的,改了一下有效果了..