21 Commits

Author SHA1 Message Date
Martin Prokoph
fd1a2d5545 Merge pull request #133 from Motschen/backport/1.21.1
backport: Blur+ v5.2.2 for 1.21.1
2025-07-15 18:44:25 +02:00
Martin Prokoph
06876d98e4 backport: adjust for 1.21.1
phew...
2025-07-15 18:43:59 +02:00
Martin Prokoph
0fd10408ca Merge branch 'plus-1.21.1' into backport/1.21.1 2025-07-15 17:46:05 +02:00
Martin Prokoph
7d207e8197 port: Chase the Skies (1.21.6)
Surprising amount of changes – even more surprised I got this working so fast :)
2025-06-17 19:13:41 +02:00
Martin Prokoph
5e4f4abd3b feat: use MidnightLib's new widget API for radius slider 2025-05-14 10:14:01 +02:00
Martin Prokoph
97c3a1c2ac Merge pull request #125 from Texaliuz/patch-1
Translation to Argentine Spanish (es_ar) for the Blur+ mod
2025-05-03 20:21:12 +02:00
Texaliuz
bc62322743 Create es_ar.json
Translation to Argentine Spanish (es_ar) for the Blur+ mod
2025-04-28 13:28:55 -03:00
Martin Prokoph
fa6fd82e4d fix: move gradient z-coordinate further back 2025-04-23 10:18:55 +02:00
Martin Prokoph
9d5b02bd0a fix: gradient breaking various mod screens 2025-04-19 10:43:57 +02:00
Martin Prokoph
528958fa8c fix: improve gradient handling 2025-04-19 09:58:54 +02:00
Martin Prokoph
552f1e619e feat: improve config screen with comments 2025-03-29 19:30:38 +01:00
Martin Prokoph
c9c630ac11 fix: less invasive gradient injection
- Should fix various compatibility issues with other mods
2025-03-29 18:45:19 +01:00
Martin Prokoph
695fa67270 feat: various improvements
- Update to MidnightLib 1.7.0 and use its features to make the config screen more reliable
- Fix background gradient being opaque briefly when fading out while not in a world
- Fix 1.21.5 compat (still compatible with 1.21.4 as well :D)
2025-03-28 23:35:46 +01:00
Martin Prokoph
5f9738da38 fix: add null-check for Minecraft options
- Fixes #119
2025-02-02 21:00:03 +01:00
Martin Prokoph
881709c165 readme: remove duplicate banner 2025-01-27 16:39:08 +01:00
Martin Prokoph
50ed77006d chore: bump version 2025-01-27 12:24:13 +01:00
Martin Prokoph
e99572eb4d fix: crash in production when opening config screen 2025-01-27 12:23:07 +01:00
Martin Prokoph
f7465ee08e feat: title screen blur
- Also fix config changes not being saved
2025-01-25 18:53:32 +01:00
Martin Prokoph
75bfeb2ce3 feat: add mirror of blur radius to config screen
- The blur radius can normally be configured in Minecraft's Accessibility settings. However, this has caused confusion for some users, so it can now also be configured via the config screen.
2025-01-20 16:44:35 +01:00
Martin Prokoph
e5c2a542f4 fix: container blur not working on NeoForge 2025-01-14 11:50:04 +01:00
Martin Prokoph
a13cdd11a7 Update dependencies to 1.21.4 2024-12-08 18:11:51 +01:00
21 changed files with 278 additions and 98 deletions

View File

@@ -1,5 +1,3 @@
![Banner art for the mod Blur+](https://i.ibb.co/GM4HVDC/PoBrnNM.png)
Ever thought that the world behind your inventory was just too distracting?
Or that the default Minecraft blur effect is just too boring?
Then this mod is just right for you!

View File

@@ -3,7 +3,7 @@ import groovy.json.JsonOutput
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.7-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.10-SNAPSHOT" apply false
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}

View File

@@ -3,6 +3,7 @@ package eu.midnightdust.blur;
import eu.midnightdust.blur.config.BlurConfig;
import eu.midnightdust.blur.util.RainbowColor;
import eu.midnightdust.lib.util.MidnightColorUtil;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import org.joml.Math;
import org.joml.Matrix4f;
@@ -15,12 +16,29 @@ import static eu.midnightdust.blur.util.RainbowColor.hue;
import static eu.midnightdust.blur.util.RainbowColor.hue2;
public class Blur {
public static final String MOD_ID = "blur";
public static void init() {
BlurConfig.init("blur", BlurConfig.class);
BlurConfig.init(MOD_ID, BlurConfig.class);
}
public static boolean doFade = false;
public static void onRender() {
if (!BlurInfo.doTest && BlurInfo.screenChanged) { // After the tests for blur and background color have been completed
Blur.onScreenChange();
BlurInfo.screenChanged = false;
}
BlurInfo.doTest = false; // Set the test state to completed, as tests will happen in the same tick.
}
public static void renderFadeout(DrawContext context, int width, int height, MinecraftClient client) {
if (BlurInfo.start >= 0 && !BlurInfo.screenHasBlur && BlurInfo.prevScreenHasBlur) { // Fade out in non-blurred screens
client.gameRenderer.renderBlur(client.getRenderTickCounter().getTickDelta(true));
client.getFramebuffer().beginWrite(false);
if (BlurInfo.prevScreenHasBackground && BlurConfig.useGradient) Blur.renderRotatedGradient(context, width, height);
}
}
public static void onScreenChange() {
if (screenHasBlur) {
if (doFade) {
@@ -61,10 +79,10 @@ public class Blur {
int b = (col.getRGB() >> 8) & 0xFF;
int g = col.getRGB() & 0xFF;
float prog = progress;
a *= prog;
r *= prog;
g *= prog;
b *= prog;
a = (int) (prog * a);
r = (int) (prog * r);
g = (int) (prog * g);
b = (int) (prog * b);
return a << 24 | r << 16 | b << 8 | g;
}
public static int getRotation() {
@@ -75,11 +93,13 @@ public class Blur {
float diagonal = Math.sqrt((float) width*width + height*height);
int smallestDimension = Math.min(width, height);
context.getMatrices().push();
Matrix4f posMatrix = context.getMatrices().peek().getPositionMatrix();
posMatrix.rotationZ(Math.toRadians(getRotation()));
posMatrix.setTranslation(width / 2f, height / 2f, 0); // Make the gradient's center the pivot point
posMatrix.setTranslation(width / 2f, height / 2f, -1000); // Make the gradient's center the pivot point
posMatrix.scale(diagonal / smallestDimension); // Scales the gradient to the maximum diagonal value needed
context.fillGradient(-width / 2, -height / 2, width / 2, height / 2, Blur.getBackgroundColor(false), Blur.getBackgroundColor(true)); // Actually draw the gradient
posMatrix.rotationZ(0);
context.getMatrices().pop();
}
}

View File

@@ -1,9 +1,18 @@
package eu.midnightdust.blur.config;
import com.google.common.collect.Lists;
import eu.midnightdust.blur.Blur;
import eu.midnightdust.lib.config.MidnightConfig;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.widget.SliderWidget;
import net.minecraft.client.gui.widget.TextIconButtonWidget;
import net.minecraft.client.option.GameOptions;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import static java.lang.Math.*;
@@ -14,28 +23,17 @@ public class BlurConfig extends MidnightConfig {
public static final String SCREENS = "screens";
@Entry @Hidden public static int configVersion = 2;
@Comment(category = SCREENS, centered = true)
public static Comment _general;
@Entry(category = SCREENS)
public static boolean blurContainers = true;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeTimeMillis = 300;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeOutTimeMillis = 300;
@Entry(category = ANIMATIONS)
public static BlurConfig.Easing animationCurve = Easing.FLAT;
@Entry(category = STYLE)
public static boolean useGradient = true;
@Entry(category = STYLE, isColor = true, width = 7, min = 7)
public static String gradientStart = "#000000";
@Entry(category = STYLE, isSlider = true, min = 0, max = 255)
public static int gradientStartAlpha = 75;
@Entry(category = STYLE, isColor = true, width = 7, min = 7)
public static String gradientEnd = "#000000";
@Entry(category = STYLE, isSlider = true, min = 0, max = 255)
public static int gradientEndAlpha = 75;
@Entry(category = STYLE, isSlider = true, min = 0, max = 360)
public static int gradientRotation = 0;
@Entry(category = STYLE)
public static boolean rainbowMode = false;
@Entry(category = SCREENS)
public static boolean blurTitleScreen = false;
@Condition(requiredOption = "blurTitleScreen", visibleButLocked = true)
@Entry(category = SCREENS)
public static boolean darkenTitleScreen = false;
@Comment(category = SCREENS, centered = true)
public static Comment _advanced;
@Entry(category = SCREENS) // Screens where Blur+ should not apply transition effects (mostly dynamically blurred screens)
public static List<String> excludedScreens = Lists.newArrayList("net.irisshaders.iris.gui.screen.ShaderPackScreen");
@Entry(category = SCREENS) // Screens where the vanilla blur effect should be force enabled
@@ -43,6 +41,37 @@ public class BlurConfig extends MidnightConfig {
@Entry(category = SCREENS) // Screens where the vanilla blur effect should be force disabled
public static List<String> forceDisabledScreens = Lists.newArrayList();
@Comment(category = STYLE, centered = true)
public static Comment _gradient;
@Entry(category = STYLE)
public static boolean useGradient = true;
@Condition(requiredOption = "useGradient", visibleButLocked = true)
@Entry(category = STYLE, isColor = true, width = 7, min = 7)
public static String gradientStart = "#000000";
@Condition(requiredOption = "useGradient", visibleButLocked = true)
@Entry(category = STYLE, isSlider = true, min = 0, max = 255)
public static int gradientStartAlpha = 75;
@Condition(requiredOption = "useGradient", visibleButLocked = true)
@Entry(category = STYLE, isColor = true, width = 7, min = 7)
public static String gradientEnd = "#000000";
@Condition(requiredOption = "useGradient", visibleButLocked = true)
@Entry(category = STYLE, isSlider = true, min = 0, max = 255)
public static int gradientEndAlpha = 75;
@Condition(requiredOption = "useGradient", visibleButLocked = true)
@Entry(category = STYLE, isSlider = true, min = 0, max = 360)
public static int gradientRotation = 0;
@Entry(category = STYLE)
public static boolean rainbowMode = false;
@Comment(category = ANIMATIONS, centered = true)
public static Comment _animations;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeTimeMillis = 300;
@Entry(category = ANIMATIONS, min = 0, max = 2000, isSlider = true)
public static int fadeOutTimeMillis = 300;
@Entry(category = ANIMATIONS)
public static BlurConfig.Easing animationCurve = Easing.FLAT;
public enum Easing {
// Based on https://gist.github.com/dev-hydrogen/21a66f83f0386123e0c0acf107254843
// Thank you very much!
@@ -70,4 +99,51 @@ public class BlurConfig extends MidnightConfig {
return functionOut.apply(x).doubleValue();
}
}
private static GameOptions options;
@Override
public void onTabInit(String tabName, MidnightConfigListWidget list, MidnightConfigScreen screen) {
options = MinecraftClient.getInstance().options;
if (Objects.equals(tabName, STYLE)) {
EntryInfo centered = new EntryInfo(null, Blur.MOD_ID);
centered.comment = new Comment(){
@Override
public boolean centered() {
return true;
}
public Class<? extends Annotation> annotationType() {return null;}
public String category() {return "";}
public String name() {return "";}
public String url() {return "";}
public String requiredMod() {return "";}
};
RadiusSliderWidget slider = new RadiusSliderWidget(screen.width - 185, 0, 150, 20);
TextIconButtonWidget resetButton = TextIconButtonWidget.builder(Text.translatable("controls.reset"), (button -> {
options.getMenuBackgroundBlurriness().setValue(5);
screen.updateList();
}), true).texture(Identifier.of("midnightlib","icon/reset"), 12, 12).dimension(20, 20).build();
resetButton.setPosition(screen.width - 205 + 150 + 25, 0);
slider.resetButton = resetButton;
slider.updateMessage();
list.addButton(Lists.newArrayList(), Text.translatable("blur.midnightconfig._blur"), centered);
list.addButton(Lists.newArrayList(slider, resetButton), Text.translatable("blur.midnightconfig.radius"), new EntryInfo(null, Blur.MOD_ID));
}
}
public static class RadiusSliderWidget extends SliderWidget {
TextIconButtonWidget resetButton;
public RadiusSliderWidget(int x, int y, int width, int height) {
super(x, y, width, height, Text.empty(), options.getMenuBackgroundBlurrinessValue() / 20d);
}
public void updateMessage() {
this.setMessage(Text.of(String.valueOf(options.getMenuBackgroundBlurrinessValue())));
if (resetButton != null) resetButton.active = options.getMenuBackgroundBlurrinessValue() != 5;
}
public void applyValue() {
options.getMenuBackgroundBlurriness().setValue(Double.valueOf(this.value * 20).intValue());
}
}
}

View File

@@ -9,7 +9,7 @@ import org.spongepowered.asm.mixin.injection.ModifyVariable;
@Mixin(GameRenderer.class)
public class MixinGameRenderer {
@ModifyVariable(method = "renderBlur", at = @At("STORE"), ordinal = 0)
@ModifyVariable(method = "renderBlur", at = @At("STORE"), ordinal = 1)
private float blur$modifyRadius(float radius) { // Modify the radius based on the animation progress
if (!BlurInfo.screenChanged && BlurInfo.start >= 0) // Only update the progress after all tests have been completed
Blur.updateProgress(BlurInfo.screenHasBlur);

View File

@@ -1,6 +1,8 @@
package eu.midnightdust.blur.mixin;
import eu.midnightdust.blur.Blur;
import eu.midnightdust.blur.config.BlurConfig;
import eu.midnightdust.lib.util.PlatformFunctions;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.ingame.HandledScreen;
@@ -17,7 +19,11 @@ public class MixinHandledScreen extends Screen {
}
@Inject(method = "renderBackground", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/ingame/HandledScreen;drawBackground(Lnet/minecraft/client/gui/DrawContext;FII)V", shift = At.Shift.BEFORE))
private void blur$renderContainerBlur(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) { // Applies the blur effect in containers (Inventory, Chest, etc.)
if (BlurConfig.blurContainers) this.applyBlur();
private void blur$renderContainerBlur(DrawContext context, int mouseX, int mouseY, float tickDelta, CallbackInfo ci) { // Applies the blur effect in containers (Inventory, Chest, etc.)
if (BlurConfig.blurContainers) this.applyBlur(tickDelta);
}
@Inject(at = @At("HEAD"), method = "render")
public void blur$processScreenChange(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
if (PlatformFunctions.getPlatformName().equals("neoforge")) Blur.onRender();
}
}

View File

@@ -22,7 +22,7 @@ public class MixinInGameHud {
if (client.currentScreen == null && client.world != null && BlurInfo.start >= 0 && BlurInfo.prevScreenHasBlur) {
BlurInfo.doTest = false;
BlurInfo.screenChanged = false;
this.client.gameRenderer.renderBlur();
this.client.gameRenderer.renderBlur(tickCounter.getTickDelta(true));
this.client.getFramebuffer().beginWrite(false);
if (BlurInfo.prevScreenHasBackground) Blur.renderRotatedGradient(context, client.getWindow().getScaledWidth(), client.getWindow().getScaledHeight());

View File

@@ -1,13 +1,17 @@
package eu.midnightdust.blur.mixin;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import eu.midnightdust.blur.BlurInfo;
import eu.midnightdust.blur.config.BlurConfig;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.text.Text;
import net.minecraft.util.Identifier;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
@@ -20,28 +24,14 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public abstract class MixinScreen {
@Shadow @Final protected Text title;
@Shadow protected MinecraftClient client;
@Shadow public abstract void renderInGameBackground(DrawContext context);
@Shadow public int width;
@Shadow public int height;
@Shadow protected abstract void applyBlur(float delta);
@Inject(at = @At("HEAD"), method = "render")
public void blur$processScreenChange(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
if (!BlurInfo.doTest && BlurInfo.screenChanged) { // After the tests for blur and background color have been completed
Blur.onScreenChange();
BlurInfo.screenChanged = false;
}
if (BlurInfo.start >= 0 && !BlurInfo.screenHasBlur && BlurInfo.prevScreenHasBlur) { // Fade out in non-blurred screens
this.client.gameRenderer.renderBlur();
this.client.getFramebuffer().beginWrite(false);
if (BlurInfo.prevScreenHasBackground) Blur.renderRotatedGradient(context, width, height);
}
BlurInfo.doTest = false; // Set the test state to completed, as tests will happen in the same tick.
}
@Inject(at = @At("HEAD"), method = "renderInGameBackground")
public void blur$getBackgroundEnabled(DrawContext context, CallbackInfo ci) {
BlurInfo.screenHasBackground = true; // Test if the screen has a background
Blur.onRender();
Blur.renderFadeout(context, width, height, client);
}
@Inject(at = @At("HEAD"), method = "applyBlur", cancellable = true)
public void blur$getBlurEnabled(CallbackInfo ci) {
@@ -51,21 +41,23 @@ public abstract class MixinScreen {
if (!BlurConfig.excludedScreens.contains(this.getClass().getCanonicalName()))
BlurInfo.screenHasBlur = true; // Test if the screen has blur
}
@Inject(at = @At("HEAD"), method = "renderDarkening(Lnet/minecraft/client/gui/DrawContext;IIII)V", cancellable = true)
public void blur$applyGradient(DrawContext context, int x, int y, int width, int height, CallbackInfo ci) {
if (BlurConfig.useGradient) { // Replaces the background texture with a gradient
renderInGameBackground(context);
ci.cancel();
}
@WrapOperation(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;renderBackgroundTexture(Lnet/minecraft/client/gui/DrawContext;Lnet/minecraft/util/Identifier;IIFFII)V"), method = "renderDarkening(Lnet/minecraft/client/gui/DrawContext;IIII)V")
private void blur$applyGradient(DrawContext context, Identifier texture, int x, int y, float u, float v, int width, int height, Operation<Void> original) {
if (BlurConfig.useGradient) {
blur$renderGradient(context); // Replaces the background texture with a gradient
} else original.call(context, texture, x, y, u, v, width, height);
}
@Inject(at = @At("HEAD"), method = "renderInGameBackground", cancellable = true)
public void blur$rotatedGradient(DrawContext context, CallbackInfo ci) {
@WrapOperation(at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;fillGradient(IIIIII)V"), method = "renderInGameBackground")
public void blur$rotatedGradient(DrawContext context, int startX, int startY, int endX, int endY, int colorStart, int colorEnd, Operation<Void> original) {
blur$renderGradient(context);
}
@Unique
private void blur$renderGradient(DrawContext context) {
BlurInfo.screenHasBackground = true; // Test if the screen has a background
if (BlurConfig.forceEnabledScreens.contains(this.getClass().getCanonicalName()))
((ScreenAccessor)this).forceApplyBlur();
this.applyBlur(client.getRenderTickCounter().getTickDelta(true));
Blur.renderRotatedGradient(context, width, height); // Replaces the default gradient with our rotated one
ci.cancel();
}
}

View File

@@ -0,0 +1,28 @@
package eu.midnightdust.blur.mixin;
import eu.midnightdust.blur.Blur;
import eu.midnightdust.blur.config.BlurConfig;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.gui.screen.TitleScreen;
import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(TitleScreen.class)
public abstract class MixinTitleScreen extends Screen {
protected MixinTitleScreen(Text title) {
super(title);
}
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/TitleScreen;renderPanoramaBackground(Lnet/minecraft/client/gui/DrawContext;F)V", shift = At.Shift.AFTER))
private void blur$renderTitleBlur(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
if (BlurConfig.blurTitleScreen) {
Blur.updateProgress(true);
this.applyBlur(delta);
if (BlurConfig.darkenTitleScreen) this.renderDarkening(context);
}
}
}

View File

@@ -1,11 +0,0 @@
package eu.midnightdust.blur.mixin;
import net.minecraft.client.gui.screen.Screen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(Screen.class)
public interface ScreenAccessor {
@Invoker("applyBlur")
void forceApplyBlur();
}

View File

@@ -1,8 +1,11 @@
{
"blur.midnightconfig.title": "Blur+ Konfiguration",
"blur.midnightconfig.category.animations": "Animationen",
"blur.midnightconfig.category.screens": "Bildschirme",
"blur.midnightconfig.category.style": "Stil",
"blur.midnightconfig.blurContainers": "Unschärfe in Containern",
"blur.midnightconfig.blurTitleScreen": "Unschärfe im Titelbildschirm",
"blur.midnightconfig.darkenTitleScreen": "Abgedunkelter Titelhintergrund",
"blur.midnightconfig.fadeTimeMillis": "Überblendzeit (in Millisekunden)",
"blur.midnightconfig.fadeOutTimeMillis": "Ausblendzeit (in Millisekunden)",
"blur.midnightconfig.animationCurve": "Animationskurve",
@@ -24,5 +27,10 @@
"blur.midnightconfig.gradientStartAlpha": "Farbverlauf-Anfangstransparenz",
"blur.midnightconfig.gradientEndAlpha": "Farbverlauf-Endstransparenz",
"blur.midnightconfig.gradientRotation": "Farbverlauf-Rotation",
"blur.midnightconfig.excludedScreens": "Ausgeschlossene Bildschirme"
"blur.midnightconfig.excludedScreens": "Ausgeschlossene Bildschirme",
"blur.midnightconfig._general": "⛏ Generell",
"blur.midnightconfig._advanced": "⚒ Fortgeschritten",
"blur.midnightconfig._blur": "▒ Unschärfe",
"blur.midnightconfig._gradient": "\uD83D\uDFE2 Farbverlauf",
"blur.midnightconfig._animations": "\uD83D\uDCFD Animationen"
}

View File

@@ -4,6 +4,8 @@
"blur.midnightconfig.category.style": "Style",
"blur.midnightconfig.category.screens": "Screens",
"blur.midnightconfig.blurContainers": "Apply Blur to Containers",
"blur.midnightconfig.blurTitleScreen": "Apply Blur to Title Screen",
"blur.midnightconfig.darkenTitleScreen": "Darken Title Screen Background",
"blur.midnightconfig.fadeTimeMillis": "Fade Time (in milliseconds)",
"blur.midnightconfig.fadeOutTimeMillis": "Fade Out Time (in milliseconds)",
"blur.midnightconfig.animationCurve": "Animation Curve",
@@ -18,6 +20,7 @@
"blur.midnightconfig.enum.Easing.BACK": "Back",
"blur.midnightconfig.enum.Easing.ELASTIC": "Elastic",
"blur.midnightconfig.radius": "Radius",
"blur.midnightconfig.radius.label.tooltip": "Mirror of \"Menu Background Blur\" found in Minecraft's Accessibility Settings",
"blur.midnightconfig.rainbowMode": "Rainbow Mode \uD83C\uDF08",
"blur.midnightconfig.useGradient": "Gradient as Background",
"blur.midnightconfig.gradientStart": "Gradient Start Color",
@@ -30,5 +33,10 @@
"blur.midnightconfig.forceEnabledScreens": "Force-enabled Screens",
"blur.midnightconfig.forceEnabledScreens.tooltip": "Screens where the vanilla blur effect should be force-enabled\nMight not work 100% of the time",
"blur.midnightconfig.forceDisabledScreens": "Force-disabled Screens",
"blur.midnightconfig.forceDisabledScreens.tooltip": "Screens where the vanilla blur effect should be force-disabled"
"blur.midnightconfig.forceDisabledScreens.tooltip": "Screens where the vanilla blur effect should be force-disabled",
"blur.midnightconfig._general": "⛏ General",
"blur.midnightconfig._advanced": "⚒ Advanced",
"blur.midnightconfig._blur": "▒ Blur",
"blur.midnightconfig._gradient": "\uD83D\uDFE2 Gradient",
"blur.midnightconfig._animations": "\uD83D\uDCFD Animations"
}

View File

@@ -0,0 +1,41 @@
{
"blur.midnightconfig.title": "Configuración de Blur+",
"blur.midnightconfig.category.animations": "Animaciones",
"blur.midnightconfig.category.style": "Estilo",
"blur.midnightconfig.category.screens": "Pantallas",
"blur.midnightconfig.blurContainers": "Aplicar Desenfoque a Contenedores",
"blur.midnightconfig.fadeTimeMillis": "Tiempo de Aparición (en milisegundos)",
"blur.midnightconfig.fadeOutTimeMillis": "Tiempo de Desaparición (en milisegundos)",
"blur.midnightconfig.animationCurve": "Curva de Animación",
"blur.midnightconfig.enum.Easing.FLAT": "Plano",
"blur.midnightconfig.enum.Easing.SINE": "Seno",
"blur.midnightconfig.enum.Easing.QUAD": "Cuadrática",
"blur.midnightconfig.enum.Easing.CUBIC": "Cúbica",
"blur.midnightconfig.enum.Easing.QUART": "Cuártica",
"blur.midnightconfig.enum.Easing.QUINT": "Quíntica",
"blur.midnightconfig.enum.Easing.EXPO": "Exponencial",
"blur.midnightconfig.enum.Easing.CIRC": "Circular",
"blur.midnightconfig.enum.Easing.BACK": "Retroceso",
"blur.midnightconfig.enum.Easing.ELASTIC": "Elástica",
"blur.midnightconfig.radius": "Radio",
"blur.midnightconfig.rainbowMode": "Modo Arcoíris \ud83c\udf08",
"blur.midnightconfig.useGradient": "Usar Gradiente como Fondo",
"blur.midnightconfig.gradientStart": "Color Inicial del Gradiente",
"blur.midnightconfig.gradientEnd": "Color Final del Gradiente",
"blur.midnightconfig.gradientStartAlpha": "Transparencia Inicial del Gradiente",
"blur.midnightconfig.gradientEndAlpha": "Transparencia Final del Gradiente",
"blur.midnightconfig.gradientRotation": "Rotación del Gradiente",
"blur.midnightconfig.excludedScreens": "Pantallas Excluidas",
"blur.midnightconfig.excludedScreens.tooltip": "Pantallas donde Blur+ no debería animar",
"blur.midnightconfig.forceEnabledScreens": "Pantallas con Blur Forzado",
"blur.midnightconfig.forceEnabledScreens.tooltip": "Pantallas donde el desenfoque vanilla debería forzarse habilitado\nPuede que no funcione siempre al 100%",
"blur.midnightconfig.forceDisabledScreens": "Pantallas con Blur Deshabilitado",
"blur.midnightconfig.forceDisabledScreens.tooltip": "Pantallas donde el desenfoque vanilla debería forzarse deshabilitado"
}

View File

@@ -4,13 +4,13 @@
"package": "eu.midnightdust.blur.mixin",
"compatibilityLevel": "JAVA_21",
"client": [
"MixinScreen",
"ScreenAccessor",
"MixinHandledScreen",
"MixinMinecraftClient",
"MixinGameOptions",
"MixinGameRenderer",
"MixinHandledScreen",
"MixinInGameHud",
"MixinGameOptions"
"MixinMinecraftClient",
"MixinScreen",
"MixinTitleScreen"
],
"injectors": {
"defaultRequire": 1

View File

@@ -83,7 +83,8 @@ unifiedPublishing {
curseforge {
token = CURSEFORGE_TOKEN
id = rootProject.curseforge_id
gameVersions.addAll "Java 21", project.minecraft_version, project.supported_versions
gameVersions.addAll "Java 21", project.minecraft_version
if (project.supported_versions != "") gameVersions.addAll project.supported_versions
}
}
@@ -93,7 +94,8 @@ unifiedPublishing {
token = MODRINTH_TOKEN
id = rootProject.modrinth_id
version = "$rootProject.version-$project.name"
gameVersions.addAll project.minecraft_version, project.supported_versions
gameVersions.addAll project.minecraft_version
if (project.supported_versions != "") gameVersions.addAll project.supported_versions
}
}
}

View File

@@ -22,7 +22,9 @@
"authors": [
"Motschen",
"tterrag1098",
"Pyrofab",
"Pyrofab"
],
"contributors": [
"backryun",
"byquanton"
],
@@ -31,6 +33,7 @@
"blur.mixins.json"
],
"depends": {
"minecraft": ">=1.21.2"
"minecraft": ">=1.21",
"midnightlib": ">=1.7.5"
}
}

View File

@@ -2,13 +2,13 @@
org.gradle.jvmargs=-Xmx2G
org.gradle.parallel=true
minecraft_version=1.21.3
supported_versions=1.21.2
yarn_mappings=1.21.3+build.2
minecraft_version=1.21.1
supported_versions=1.21
yarn_mappings=1.21.1+build.3
enabled_platforms=fabric,neoforge
# Mod Properties
mod_version=5.0.1
mod_version=5.2.2+1.21.1
maven_group=eu.midnightdust.blur
archives_base_name=blur
release_type=release
@@ -16,12 +16,12 @@ curseforge_id=393563
modrinth_id=NK39zBp2
# Modloaders
fabric_loader_version=0.16.9
fabric_api_version=0.107.0+1.21.3
fabric_loader_version=0.16.13
fabric_api_version=0.115.4+1.21.1
neoforge_version=21.3.11-beta
neoforge_version=21.1.192
yarn_mappings_patch_neoforge_version = 1.21+build.4
# Libraries
midnightlib_version = 1.6.4
midnightlib_version = 1.7.5+1.21.1
modmenu_version = 11.0.2

View File

@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME

View File

@@ -96,7 +96,8 @@ unifiedPublishing {
curseforge {
token = CURSEFORGE_TOKEN
id = rootProject.curseforge_id
gameVersions.addAll "Java 21", project.minecraft_version, project.supported_versions
gameVersions.addAll "Java 21", project.minecraft_version
if (project.supported_versions != "") gameVersions.addAll project.supported_versions
}
}
@@ -106,7 +107,8 @@ unifiedPublishing {
token = MODRINTH_TOKEN
id = rootProject.modrinth_id
version = "$rootProject.version-$project.name"
gameVersions.addAll project.minecraft_version, project.supported_versions
gameVersions.addAll project.minecraft_version
if (project.supported_versions != "") gameVersions.addAll project.supported_versions
}
}
}

View File

@@ -8,13 +8,13 @@ import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.event.ClientTickEvent;
@Mod(value = "blur", dist = Dist.CLIENT)
@Mod(value = Blur.MOD_ID, dist = Dist.CLIENT)
public class BlurNeoForge {
public BlurNeoForge() {
Blur.init();
}
@EventBusSubscriber(modid = "blur", bus = EventBusSubscriber.Bus.GAME, value = Dist.CLIENT)
@EventBusSubscriber(modid = Blur.MOD_ID, value = Dist.CLIENT)
public static class ClientGameEvents {
@SubscribeEvent
public static void endClientTick(ClientTickEvent.Post event) {

View File

@@ -26,6 +26,13 @@ side = "CLIENT"
[[dependencies.blur]]
modId = "minecraft"
mandatory = true
versionRange = "[1.21.2,)"
versionRange = "[1.21,1.21.1]"
ordering = "NONE"
side = "CLIENT"
[[dependencies.blur]]
modId = "midnightlib"
mandatory = true
versionRange = "[1.7.5,)"
ordering = "NONE"
side = "CLIENT"