Fix mixin apply error

This commit is contained in:
Martin Prokoph
2024-11-05 19:10:09 +01:00
parent 9ee7ab1b89
commit ab83b2744a
2 changed files with 3 additions and 3 deletions

View File

@@ -61,7 +61,7 @@ public abstract class MixinSplashScreen extends Overlay {
private int puzzle$modifyBackground(IntSupplier instance) { // Set the Progress Bar Frame Color to our configured value // private int puzzle$modifyBackground(IntSupplier instance) { // Set the Progress Bar Frame Color to our configured value //
return (!PuzzleConfig.resourcepackSplashScreen || PuzzleConfig.progressBarBackgroundColor == 15675965) ? instance.getAsInt() : PuzzleConfig.backgroundColor | 255 << 24; return (!PuzzleConfig.resourcepackSplashScreen || PuzzleConfig.progressBarBackgroundColor == 15675965) ? instance.getAsInt() : PuzzleConfig.backgroundColor | 255 << 24;
} }
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/ColorHelper;getWhite(F)I", shift = At.Shift.AFTER), remap = false) @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/math/ColorHelper;getWhite(F)I", shift = At.Shift.AFTER))
private void puzzle$betterBlend(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) { private void puzzle$betterBlend(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
if (PuzzleConfig.resourcepackSplashScreen) { if (PuzzleConfig.resourcepackSplashScreen) {
if (PuzzleConfig.disableBlend) RenderSystem.disableBlend(); if (PuzzleConfig.disableBlend) RenderSystem.disableBlend();
@@ -93,7 +93,7 @@ public abstract class MixinSplashScreen extends Overlay {
RenderSystem.enableBlend(); RenderSystem.enableBlend();
RenderSystem.blendEquation(32774); RenderSystem.blendEquation(32774);
RenderSystem.defaultBlendFunc(); RenderSystem.defaultBlendFunc();
context.drawTexture(RenderLayer::getGuiTextured, BACKGROUND, 0, 0, 0, 0, width, height, width, height, ColorHelper.fromFloats(s, 1.0f, 1.0f, 1.0f)); context.drawTexture(RenderLayer::getGuiTextured, BACKGROUND, 0, 0, 0, 0, width, height, width, height, ColorHelper.getWhite(s));
RenderSystem.defaultBlendFunc(); RenderSystem.defaultBlendFunc();
RenderSystem.disableBlend(); RenderSystem.disableBlend();
} }

View File

@@ -7,7 +7,7 @@ yarn_mappings=1.21.3+build.2
enabled_platforms=fabric,neoforge enabled_platforms=fabric,neoforge
# Mod Properties # Mod Properties
mod_version = 2.0.2 mod_version = 2.0.3
maven_group = net.puzzlemc maven_group = net.puzzlemc
archives_base_name = puzzle archives_base_name = puzzle
release_type=release release_type=release