mirror of
https://github.com/Motschen/Blur.git
synced 2025-12-13 10:25:09 +01:00
Merge pull request #84 from SzczurekYT/null-fix
Fix crash when Blur.prevScreen is null
This commit is contained in:
@@ -19,7 +19,7 @@ public class MixinInGameHud {
|
||||
@Final @Shadow private MinecraftClient client;
|
||||
@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.blurExclusions.stream().noneMatch(exclusion -> Blur.prevScreen.startsWith(exclusion)) && Blur.screenHasBackground) {
|
||||
if (client.currentScreen == null && client.world != null && Blur.start > 0 && (Blur.prevScreen == null || BlurConfig.blurExclusions.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));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user