Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions common/src/main/java/vice/sol_valheim/FoodHUD.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ public void renderHud(#if PRE_CURRENT_MC_1_19_2 PoseStack #elif POST_CURRENT_MC_
boolean useLargeIcons = SOLValheim.Config.client.useLargeIcons;

int width = client.getWindow().getGuiScaledWidth() / 2 + 91;
int height = client.getWindow().getGuiScaledHeight() - 39 - (useLargeIcons ? 6 : 0);
int height = client.getWindow().getGuiScaledHeight() - 39 - (useLargeIcons ? 10 : 0);

int offset = 1;
int size = useLargeIcons ? 14 : 9;
int size = useLargeIcons ? 18 : 9;

for (var food : foodData.ItemEntries) {
renderFoodSlot(graphics, food, width, size, offset, height, useLargeIcons);
Expand Down Expand Up @@ -93,7 +93,7 @@ private static void renderFoodSlot(#if PRE_CURRENT_MC_1_19_2 PoseStack #elif POS
FastColor.ARGB32.color(96, 0, 0, 0);

var time = (float) food.ticksLeft / (20 * 60);
var scale = useLargeIcons ? 0.75f : 0.5f;
var scale = useLargeIcons ? 1f : 0.5f;
var isSeconds = false;
var minutes = String.format("%.0f", time);

Expand All @@ -110,7 +110,7 @@ private static void renderFoodSlot(#if PRE_CURRENT_MC_1_19_2 PoseStack #elif POS

pose.pushPose();
pose.scale(scale, scale, scale);
pose.translate(startWidth * (useLargeIcons ? 0.3333f : 1f), height * (useLargeIcons ? 0.3333f : 1f), 0f);
pose.translate(startWidth * (useLargeIcons ? 0f : 1f), height * (useLargeIcons ? 0f : 1f), 0f);

if (food.item == Items.CAKE && Platform.isModLoaded("farmersdelight"))
{
Expand Down