Untitled
unknown
java
a year ago
983 B
14
Indexable
public class ManaHudOverlay { private static final ResourceLocation FILLED_MANA = new ResourceLocation(DamkusWeaponry.MOD_ID, "textures/mana/filled_mana.png"); private static final ResourceLocation EMPTY_MANA = new ResourceLocation(DamkusWeaponry.MOD_ID, "textures/mana/empty_mana.png"); public static final IGuiOverlay HUD_MANA = ((gui, poseStack, partialTick, width, height) -> { int x = width / 2; int y = height; for (int i = 0; i < 10; i++) { poseStack.blit(EMPTY_MANA,x - 65 + (i * 13), y - 54,0,0,12,12, 12,12); } RenderSystem.setShaderTexture(0, FILLED_MANA); for (int i = 0; i < 10; i++) { if (ClientManaData.getPlayerMana() > i) { poseStack.blit(FILLED_MANA,x - 65 + (i * 13),y - 54,0,0,12,12, 12,12); } else { break; } } }); }
Leave a Comment