Architectury port, EMI compat

This commit is contained in:
Martin Prokoph
2024-09-06 21:44:34 +02:00
parent b6266b8e48
commit f68048d955
41 changed files with 611 additions and 234 deletions

View File

@@ -0,0 +1,18 @@
package eu.midnightdust.blur.mixin;
import eu.midnightdust.blur.Blur;
import eu.midnightdust.blur.BlurInfo;
import net.minecraft.client.render.GameRenderer;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyVariable;
@Mixin(GameRenderer.class)
public class MixinGameRenderer {
@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);
return radius * BlurInfo.progress;
}
}