fixing "small cleanup" issues

This commit is contained in:
C10udburst
2022-01-12 19:08:26 +01:00
parent f29e75c25e
commit 459b158cd8
6 changed files with 14 additions and 14 deletions

View File

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

View File

@@ -42,8 +42,8 @@ public class CrystalHud extends HudElement {
if (isInEditor()) {
RenderUtils.drawItem(Items.END_CRYSTAL.getDefaultStack(), (int) x, (int) y, scale.get(), true);
} else if (InvUtils.find(Items.END_CRYSTAL).getCount() > 0) {
RenderUtils.drawItem(new ItemStack(Items.END_CRYSTAL, InvUtils.find(Items.END_CRYSTAL).getCount()), (int) x, (int) y, scale.get(), true);
} else if (InvUtils.find(Items.END_CRYSTAL).count() > 0) {
RenderUtils.drawItem(new ItemStack(Items.END_CRYSTAL, InvUtils.find(Items.END_CRYSTAL).count()), (int) x, (int) y, scale.get(), true);
}
}
}

View File

@@ -40,8 +40,8 @@ public class ExpHud extends HudElement {
if (isInEditor()) {
RenderUtils.drawItem(Items.EXPERIENCE_BOTTLE.getDefaultStack(), (int) x, (int) y, scale.get(), true);
} else if (InvUtils.find(Items.EXPERIENCE_BOTTLE).getCount() > 0) {
RenderUtils.drawItem(new ItemStack(Items.EXPERIENCE_BOTTLE, InvUtils.find(Items.EXPERIENCE_BOTTLE).getCount()), (int) x, (int) y, scale.get(), true);
} else if (InvUtils.find(Items.EXPERIENCE_BOTTLE).count() > 0) {
RenderUtils.drawItem(new ItemStack(Items.EXPERIENCE_BOTTLE, InvUtils.find(Items.EXPERIENCE_BOTTLE).count()), (int) x, (int) y, scale.get(), true);
}
}
}