Skip to content

Commit 3de4856

Browse files
committed
feat(gameRendererMixin): run resize function of our postchain on every resize
1 parent ebb871d commit 3de4856

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/main/java/magic/transparent_gui_background/mixin/renderer/GameRendererMixin.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ private void loadBlurEffect() {
8181
}
8282
}
8383

84+
// Run the resize function as mats need to be available even without an world loaded
85+
@Inject(method = "resize(II)V", at = @At("HEAD"), require = 1)
86+
public void beforeResize(int width, int height, CallbackInfo ci) {
87+
LOGGER.info("Bhai RAN");
88+
if (this.blurEffect != null) {
89+
LOGGER.info("Bhai WORKED");
90+
this.blurEffect.resize(width, height);
91+
}
92+
}
93+
8494
// Add our blur method in the reload section so it loads/reloads with other shaders
8595
// This fires on mojang reloading/loading screen
8696
@Inject(method = "reloadShaders", at =

0 commit comments

Comments
 (0)