Backport #8207 to 1.16 (#8209)

This commit is contained in:
Sara Freimer authored and GitHub committed 2021-11-22 22:19:02 +01:00
1 parent 53873dd3d0
commit ae7609979e
2 files changed
+11 -1

No files matched your search

@@ -170,7 +170,12 @@
}
if (this.field_238174_aV_ != null) {
@@ -1065,6 +_,7 @@
@@ -1061,10 +_,12 @@
this.field_195558_d.func_216525_a((double)i);
if (this.field_71462_r != null) {
this.field_71462_r.func_231152_a_(this, this.field_195558_d.func_198107_o(), this.field_195558_d.func_198087_p());
+ net.minecraftforge.client.ForgeHooksClient.resizeGuiLayers(this, this.field_195558_d.func_198107_o(), this.field_195558_d.func_198087_p());
}
Framebuffer framebuffer = this.func_147110_a();
framebuffer.func_216491_a(this.field_195558_d.func_198109_k(), this.field_195558_d.func_198091_l(), field_142025_a);
@@ -139,6 +139,11 @@ public class ForgeHooksClient
*/
private static final Stack<Screen> guiLayers = new Stack<>();
public static void resizeGuiLayers(Minecraft minecraft, int width, int height)
{
guiLayers.forEach(screen -> screen.resize(minecraft, width, height));
}
public static void clearGuiLayers(Minecraft minecraft)
{
while(guiLayers.size() > 0)