Skip to content

Commit

Permalink
Fix version
Browse files Browse the repository at this point in the history
  • Loading branch information
dima-dencep committed Nov 27, 2023
1 parent 78d8976 commit 69ca27c
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
version = "${project.mod_version}+mc${project.minecraft_version}"
group = project.maven_group

repositories {
Expand Down
27 changes: 27 additions & 0 deletions src/main/java/com/tterrag/blur/mixin/MixinInGameHud.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.tterrag.blur.mixin;

import com.tterrag.blur.Blur;
import com.tterrag.blur.config.BlurConfig;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.hud.InGameHud;
import net.minecraft.client.render.item.ItemRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraftforge.client.gui.overlay.ForgeGui;
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(ForgeGui.class)
public abstract class MixinInGameHud extends InGameHud {
public MixinInGameHud(MinecraftClient client, ItemRenderer itemRenderer) {
super(client, itemRenderer);
}

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

0 comments on commit 69ca27c

Please sign in to comment.