Skip to content

Commit

Permalink
Merge branch 'fabric-1.20.2' of https://github.com/Motschen/Blur into…
Browse files Browse the repository at this point in the history
… forge-1.20
  • Loading branch information
dima-dencep committed Nov 27, 2023
2 parents 17605c9 + f9a54f9 commit 5397ab1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'dev.architectury.loom' version '1.2-SNAPSHOT'
id 'dev.architectury.loom' version '1.3-SNAPSHOT'
id "io.github.p03w.machete" version "2.+"
id 'maven-publish'
}
Expand Down
1 change: 1 addition & 0 deletions gradle.properties
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

loom.platform=forge

Expand Down
6 changes: 4 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion src/main/java/com/tterrag/blur/Blur.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static void onScreenChange(Screen newGui) {
String guiClassName = newGui == null ? null : newGui.getClass().getName();

if (client.world != null) {
boolean excluded = newGui == null || BlurConfig.INSTANCE.blurExclusions.get().parallelStream().anyMatch(guiClassName::contains);
boolean excluded = newGui == null || BlurConfig.INSTANCE.blurExclusions.get().parallelStream().anyMatch(guiClassName::startsWith);
if (!excluded) {
screenHasBackground = false;
if (BlurConfig.INSTANCE.showScreenTitle.get()) System.out.println(guiClassName);
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/tterrag/blur/config/BlurConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ public BlurConfig(ForgeConfigSpec.Builder builder) {
"com.replaymod.lib.de.johni0702.minecraft.gui.container.AbstractGuiOverlay$UserInputGuiScreen",
"ai.arcblroth.projectInception.client.InceptionInterfaceScreen",
"net.optifine.gui.GuiChatOF",
"baritone.",
"io.github.darkkronicle.advancedchatcore.chat.AdvancedChatScreen",
"net.coderbot.iris.gui.screen.ShaderPackScreen"),
"net.coderbot.iris.gui.screen.ShaderPackScreen",
"eu.midnightdust.midnightcontrols.client.gui.TouchscreenOverlay"),
o -> o != null && List.class.isAssignableFrom(o.getClass())
);

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/tterrag/blur/mixin/MixinInGameHud.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public MixinInGameHud(MinecraftClient client, ItemRenderer itemRenderer) {

@Inject(at = @At("TAIL"), method = "render")
public void blur$onRender(DrawContext context, float tickDelta, CallbackInfo ci) {
if (client.currentScreen == null && client.world != null && Blur.start > 0 && !BlurConfig.INSTANCE.blurExclusions.get().contains(Blur.prevScreen) && Blur.screenHasBackground) {
if (client.currentScreen == null && client.world != null && Blur.start > 0 && BlurConfig.INSTANCE.blurExclusions.get().stream().noneMatch(exclusion -> Blur.prevScreen.startsWith(exclusion)) && Blur.screenHasBackground) {
context.fillGradient(0, 0, this.scaledWidth, this.scaledHeight, Blur.getBackgroundColor(false, false), Blur.getBackgroundColor(true, false));
}
}
Expand Down

0 comments on commit 5397ab1

Please sign in to comment.