Skip to content

Commit

Permalink
Compatibility with iris (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
LangYueMc authored and tyra314 committed Jan 8, 2023
1 parent a987106 commit 99330bd
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@ private void drawMinimap(MatrixStack matrices, int atlasID, VertexConsumerProvid
RenderSystem.enableBlend();
RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

matrices.push();
matrices.translate(0, 0, 0.01);
Textures.BOOK.drawWithLight(buffer, matrices, 0, 0, (int) (GuiAtlas.WIDTH * 1.5), (int) (GuiAtlas.HEIGHT * 1.5), light);
matrices.pop();

matrices.push();
matrices.scale(INNER_ELEMENTS_SCALE_FACTOR, INNER_ELEMENTS_SCALE_FACTOR, 1F);

Expand All @@ -86,6 +81,10 @@ private void drawMinimap(MatrixStack matrices, int atlasID, VertexConsumerProvid
matrices.translate(0, 0, -0.01);
Textures.BOOK_FRAME.drawWithLight(buffer, matrices, 0, 0, (int) (GuiAtlas.WIDTH * 1.5), (int) (GuiAtlas.HEIGHT * 1.5), light);

matrices.translate(0, 0, 0.04);
// I don't know why, anyway, it's compatible with iris when I put it here
Textures.BOOK.drawWithLight(buffer, matrices, 0, 0, (int) (GuiAtlas.WIDTH * 1.5), (int) (GuiAtlas.HEIGHT * 1.5), light);

RenderSystem.disableBlend();
}

Expand Down

0 comments on commit 99330bd

Please sign in to comment.