Closed lilaobajj closed 1 month ago
I want to play this mod with the man from the fog and so on 1.19.2 forge minecraft horror mods
io.github.xypercode.mods.err422.mixin.common.LoadingOverlayAccessor.setLogoBackgroundColor
I detected an issue with this part of your module using ChatGPT
Usually, in Minecraft mods, we do not recommend throwing an Error exception directly as it may cause the game to crash. A more common method is to use Exception or more specific exception types, and include detailed error messages so that users can more easily diagnose the problem.
Of course you can. I will provide a modified LoadingOverlayAccess interface that will no longer throw an Error exception, but rather a more specific exception type with a useful error message. Please note that this is just an example, and you may need to adjust the exception type and error message according to the actual situation.
package io.github.xypercode.mods.err422.mixin.common;
import net.minecraft.client.gui.screens.LoadingOverlay; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Mutable; import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin({LoadingOverlay.class}) public interface LoadingOverlayAccessor { @Mutable @Accessor("LOGO_BACKGROUND_COLOR") static void setLogoBackgroundColor(int color) throws ModException { // 在这里添加您的代码来设置加载界面的背景颜色 // 例如: LoadingOverlay.LOGO_BACKGROUND_COLOR = color; // 注意:您需要确保这里的方法调用不会导致崩溃 }
@Mutable
@Accessor("LOGO_BACKGROUND_COLOR_DARK")
static void setLogoBackgroundColorDark(int color) throws ModException {
// 在这里添加您的代码来设置加载界面的暗色背景颜色
// 例如: LoadingOverlay.LOGO_BACKGROUND_COLOR_DARK = color;
// 注意:您需要确保这里的方法调用不会导致崩溃
}
}
class ModException extends Exception { public ModException(String message) { super(message); } }
I detected an issue with this part of your module using ChatGPT
Seems like ChatGPT made an error... Mixins just failed. Also duplicate of #2 Same crash, same thing.
I really want to play this mod on 1.19.2. Please ask the author to fix the errors in the Forge version as soon as possible
Also throwing that exception is intentional as, if for some reason mixins fail, the game should crash in that case.
I really want to play this mod on 1.19.2. Please ask the author to fix the errors in the Forge version as soon as possible
Well, I'm the author, also am going to fix this as soon as possible.
ありがとうございます
this forge mod is can"t start,please fix