Increased max blur intensity & Working screen overrides

- EMI compat now works using forced blur
- Iris shader screen is now sooo much smoother
This commit is contained in:
Martin Prokoph
2024-09-06 23:33:10 +02:00
parent f68048d955
commit 8817e18a55
14 changed files with 41 additions and 112 deletions

View File

@@ -45,10 +45,10 @@ public abstract class MixinScreen {
}
@Inject(at = @At("HEAD"), method = "applyBlur", cancellable = true)
public void blur$getBlurEnabled(float delta, CallbackInfo ci) {
if (BlurConfig.forceDisabledScreens.contains(this.getClass().toString())) {
if (BlurConfig.forceDisabledScreens.contains(this.getClass().getCanonicalName())) {
ci.cancel(); return;
}
if (!BlurConfig.excludedScreens.contains(this.getClass().toString()))
if (!BlurConfig.excludedScreens.contains(this.getClass().getCanonicalName()))
BlurInfo.screenHasBlur = true; // Test if the screen has blur
}
@@ -62,8 +62,8 @@ public abstract class MixinScreen {
@Inject(at = @At("HEAD"), method = "renderInGameBackground", cancellable = true)
public void blur$rotatedGradient(DrawContext context, CallbackInfo ci) {
if (BlurConfig.forceEnabledScreens.contains(this.getClass().toString()))
(((ScreenAccessor)this)).forceApplyBlur(client.getRenderTickCounter().getTickDelta(true)); // Applies the blur effect in force-enabled screens
if (BlurConfig.forceEnabledScreens.contains(this.getClass().getCanonicalName()))
((ScreenAccessor)this).forceApplyBlur(client.getRenderTickCounter().getTickDelta(true));
Blur.renderRotatedGradient(context, width, height); // Replaces the default gradient with our rotated one
ci.cancel();