Fix #7 Blur not clearing when going back to an excluded GUI (#10)

This commit is contained in:
afdw
2017-06-06 22:28:43 +03:00
committed by tterrag
parent 01769d6990
commit 9468d3c16e

View File

@@ -118,10 +118,11 @@ public class Blur {
}
if (Minecraft.getMinecraft().world != null) {
EntityRenderer er = Minecraft.getMinecraft().entityRenderer;
if (!er.isShaderActive() && event.getGui() != null && !ArrayUtils.contains(blurExclusions, event.getGui().getClass().getName())) {
boolean excluded = event.getGui() == null || ArrayUtils.contains(blurExclusions, event.getGui().getClass().getName());
if (!er.isShaderActive() && !excluded) {
er.loadShader(new ResourceLocation("shaders/post/fade_in_blur.json"));
start = System.currentTimeMillis();
} else if (er.isShaderActive() && event.getGui() == null) {
} else if (er.isShaderActive() && excluded) {
er.stopUseShader();
}
}