fixing "small cleanup" issues
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user