apple hud now also counts egaps

This commit is contained in:
Cloudburst
2021-06-04 20:37:02 +02:00
parent 9fc85112c9
commit 8df32e28bd

View File

@@ -40,8 +40,11 @@ public class AppleHud extends HudElement {
if (isInEditor()) {
RenderUtils.drawItem(Items.GOLDEN_APPLE.getDefaultStack(), (int) x, (int) y, scale.get(), true);
} else if (InvUtils.findItemWithCount(Items.GOLDEN_APPLE).count > 0) {
RenderUtils.drawItem(new ItemStack(Items.GOLDEN_APPLE, InvUtils.findItemWithCount(Items.GOLDEN_APPLE).count), (int) x, (int) y, scale.get(), true);
} else {
int count = InvUtils.findItemWithCount(Items.GOLDEN_APPLE).count;
count += InvUtils.findItemWithCount(Items.ENCHANTED_GOLDEN_APPLE).count;
if (count > 0)
RenderUtils.drawItem(new ItemStack(Items.GOLDEN_APPLE, count), (int) x, (int) y, scale.get(), true);
}
}
}