Skip to content

Commit

Permalink
Fix toast notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Sep 1, 2024
1 parent c52654c commit 037bf32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,7 @@ public void setup(final Image image) {
OnlineRequest.checkURLForSuspicions(url);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
conn.setRequestProperty("User-Agent", "Mozilla/5.0");
conn.setRequestProperty("Accept", "image/png");
InputStream connIn = conn.getInputStream();
byte[] bytes = connIn.readAllBytes();
connIn.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Visibility render(@NotNull GuiGraphics graphics, ToastComponent toastComp
}

RenderSystem.setShaderTexture(0, icon.getIconAsset());
RenderUtil.drawRectWithTexture(null, graphics, 6, 6, icon.getGridWidth(), icon.getGridHeight(), icon.getU(), icon.getV(), icon.getSourceWidth(), icon.getSourceHeight(), icon.getIconSize(), icon.getIconSize());
graphics.blit(icon.getIconAsset(), 6, 6, icon.getGridWidth(), icon.getGridHeight(), icon.getU(), icon.getV(), icon.getIconSize(), icon.getIconSize(), icon.getSourceWidth(), icon.getSourceHeight());

return timeSinceLastVisible >= 5000L ? Visibility.HIDE : Visibility.SHOW;
}
Expand Down

0 comments on commit 037bf32

Please sign in to comment.