Skip to content

Commit

Permalink
1.19.4 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Jul 7, 2024
1 parent 22b00a5 commit 3812832
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ public static void drawScreen(float f, Screen screen, PoseStack poseStack) {
Matrix4f guiProjection = (new Matrix4f()).setOrtho(
0.0F, (float) (mc.getWindow().getWidth() / mc.getWindow().getGuiScale()),
(float) (mc.getWindow().getHeight() / mc.getWindow().getGuiScale()), 0.0F,
1000.0F, 21000.0F);
RenderSystem.setProjectionMatrix(guiProjection, VertexSorting.ORTHOGRAPHIC_Z);
1000.0F, 3000.0F);
RenderSystem.setProjectionMatrix(guiProjection);

RenderSystem.blendFuncSeparate(
GlStateManager.SourceFactor.SRC_ALPHA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.Util;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiGraphics;
import net.minecraft.util.Mth;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.block.Blocks;
Expand Down Expand Up @@ -244,7 +243,7 @@ public static void renderAndSubmit(boolean renderLevel, long nanoTime, float act
PoseStack poseStack = RenderSystem.getModelViewStack();
poseStack.pushPose();
poseStack.setIdentity();
poseStack.translate(0.0f, 0.0f, -11000.0f);
poseStack.translate(0.0f, 0.0f, -2000.0f);
RenderSystem.applyModelViewMatrix();

int x = (int) (Minecraft.getInstance().mouseHandler.xpos() * (double) Minecraft.getInstance().getWindow().getGuiScaledWidth() / (double) Minecraft.getInstance().getWindow().getScreenWidth());
Expand All @@ -270,22 +269,19 @@ public static void renderAndSubmit(boolean renderLevel, long nanoTime, float act
mc.mainRenderTarget.unbindRead();

mc.getProfiler().popPush("2D Keyboard");
GuiGraphics guiGraphics = new GuiGraphics(mc, mc.renderBuffers().bufferSource());
if (KeyboardHandler.Showing && !dataHolder.vrSettings.physicalKeyboard) {
mc.mainRenderTarget = KeyboardHandler.Framebuffer;
mc.mainRenderTarget.clear(Minecraft.ON_OSX);
mc.mainRenderTarget.bindWrite(true);
RenderHelper.drawScreen(actualPartialTicks, KeyboardHandler.UI, guiGraphics);
guiGraphics.flush();
RenderHelper.drawScreen(actualPartialTicks, KeyboardHandler.UI, new PoseStack());
}

mc.getProfiler().popPush("Radial Menu");
if (RadialHandler.isShowing()) {
mc.mainRenderTarget = RadialHandler.Framebuffer;
mc.mainRenderTarget.clear(Minecraft.ON_OSX);
mc.mainRenderTarget.bindWrite(true);
RenderHelper.drawScreen(actualPartialTicks, RadialHandler.UI, guiGraphics);
guiGraphics.flush();
RenderHelper.drawScreen(actualPartialTicks, RadialHandler.UI, new PoseStack());
}
mc.getProfiler().pop();
checkGLError("post 2d ");
Expand Down

0 comments on commit 3812832

Please sign in to comment.