Untitled
unknown
java
2 years ago
983 B
23
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;
}
}
});
}Editor is loading...
Leave a Comment