This commit is contained in:
PeytonPlayz595 2023-07-17 03:18:56 -04:00
parent 863b03a722
commit df1f20e364
4 changed files with 1616 additions and 1604 deletions

3187
js/app.js

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -244,13 +244,16 @@ public final class Minecraft implements Runnable {
this.ungrabMouse(); this.ungrabMouse();
} }
if(this.width != GL11.parent.getClientWidth() || this.height != GL11.parent.getClientHeight()) { if(this.width != GL11.parent.getClientWidth() || this.height != GL11.parent.getClientHeight() || settings.fullscreen && !GL11.isPointerLocked2()) {
GuiScreen gui = this.currentScreen; GuiScreen gui = this.currentScreen;
this.width = GL11.parent.getClientWidth(); this.width = GL11.parent.getClientWidth();
this.height = GL11.parent.getClientHeight(); this.height = GL11.parent.getClientHeight();
GL11.canvas.setWidth(width); GL11.canvas.setWidth(width);
GL11.canvas.setHeight(height); GL11.canvas.setHeight(height);
GL11.updateDisplay(); GL11.updateDisplay();
if(settings.fullscreen && !GL11.isPointerLocked2()) {
settings.fullscreen = false;
}
if (currentScreen != null) { if (currentScreen != null) {
ScaledResolution scaledresolution = new ScaledResolution(width, height); ScaledResolution scaledresolution = new ScaledResolution(width, height);
int k = scaledresolution.getScaledWidth(); int k = scaledresolution.getScaledWidth();

View File

@ -77,16 +77,24 @@ public class GuiScreen extends Screen {
public void setWorldAndResolution(Minecraft minecraft, int i, int j, GuiScreen gui) { public void setWorldAndResolution(Minecraft minecraft, int i, int j, GuiScreen gui) {
if(gui != null) { if(gui != null) {
gui.minecraft = minecraft; gui.minecraft = minecraft;
gui.fontRenderer = minecraft.fontRenderer; gui.fontRenderer = minecraft.fontRenderer;
gui.width = i; gui.width = i;
gui.height = j; gui.height = j;
gui.buttons.clear(); gui.buttons.clear();
gui.minecraft.setCurrentScreen(gui); gui.minecraft.setCurrentScreen(gui);
} }
minecraft.hud = null;
HUDScreen hud = new HUDScreen(minecraft, minecraft.width, minecraft.height); for(int var1 = 0; var1 < 5; var1++) {
hud.render(minecraft.timer.delta, minecraft.currentScreen != null, GL11.mouseGetX() * minecraft.width * 240 / minecraft.height / minecraft.width, minecraft.height * 240 / minecraft.height - GL11.mouseGetY() * minecraft.height * 240 / minecraft.height / minecraft.height - 1); minecraft.width = GL11.parent.getClientWidth();
minecraft.hud = hud; minecraft.height = GL11.parent.getClientHeight();
GL11.canvas.setWidth(minecraft.width);
GL11.canvas.setHeight(minecraft.height);
minecraft.hud = null;
HUDScreen hud = new HUDScreen(minecraft, minecraft.width, minecraft.height);
hud.render(minecraft.timer.delta, minecraft.currentScreen != null, GL11.mouseGetX() * minecraft.width * 240 / minecraft.height / minecraft.width, minecraft.height * 240 / minecraft.height - GL11.mouseGetY() * minecraft.height * 240 / minecraft.height / minecraft.height - 1);
minecraft.hud = hud;
}
GL11.updateDisplay();
} }
public final void open(Minecraft var1, int var2, int var3) { public final void open(Minecraft var1, int var2, int var3) {