Skip to content

Commit

Permalink
fix crosshair on radial menu/pointer keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
fayer3 committed Jan 13, 2025
1 parent 942bca0 commit dd6e5ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,13 @@ public static void setupPolyRendering(boolean enable) {
/**
* renders the given screen to the current main target and generates mipmaps for it
*
* @param poseStack PoseStack to render with
* @param partialTick partial tick for the screen rendering
* @param screen the Screen to render
* @param maxGuiScale if set, renders the screen at max gui scale
*/
public static void drawScreen(PoseStack poseStack, float partialTick, Screen screen, boolean maxGuiScale) {
public static void drawScreen(float partialTick, Screen screen, boolean maxGuiScale) {
// setup modelview for screen rendering
PoseStack poseStack = RenderSystem.getModelViewStack();
poseStack.pushPose();
poseStack.setIdentity();
poseStack.translate(0.0F, 0.0F, -2000.0F);
Expand All @@ -283,7 +283,7 @@ public static void drawScreen(PoseStack poseStack, float partialTick, Screen scr
GlStateManager.SourceFactor.ONE,
GlStateManager.DestFactor.ONE);

screen.render(poseStack, 0, 0, partialTick);
screen.render(new PoseStack(), 0, 0, partialTick);

RenderSystem.blendFuncSeparate(
GlStateManager.SourceFactor.SRC_ALPHA,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,15 @@ public static void renderAndSubmit(boolean renderLevel, long nanoTime, float act
MC.mainRenderTarget = KeyboardHandler.FRAMEBUFFER;
MC.mainRenderTarget.clear(Minecraft.ON_OSX);
MC.mainRenderTarget.bindWrite(true);
RenderHelper.drawScreen(new PoseStack(), actualPartialTick, KeyboardHandler.UI, true);
RenderHelper.drawScreen(actualPartialTick, KeyboardHandler.UI, true);
}

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

0 comments on commit dd6e5ef

Please sign in to comment.