Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HeartColors extends AbstractGui {
- public static final ResourceLocation BLUE_HEARTS = new ResourceLocation("xlifehealth:textures/gui/blue_hearts.png");
- public static final ResourceLocation GREEN_HEARTS = new ResourceLocation("xlifehealth:textures/gui/green_hearts.png");
- public static final ResourceLocation ORANGE_HEARTS = new ResourceLocation("xlifehealth:textures/gui/orange_hearts.png");
- public static final ResourceLocation PINK_HEARTS = new ResourceLocation("xlifehealth:textures/gui/pink_hearts.png");
- public static final ResourceLocation PURPLE_HEARTS = new ResourceLocation("xlifehealth:textures/gui/purple_hearts.png");
- public static final ResourceLocation YELLOW_HEARTS = new ResourceLocation("xlifehealth:textures/gui/yellow_hearts.png");
- public static final ResourceLocation CYAN_HEARTS = new ResourceLocation("xlifehealth:textures/gui/cyan_hearts.png");
- public static final ResourceLocation MAGENTA_HEARTS = new ResourceLocation("xlifehealth:textures/gui/magenta_hearts.png");
- public static final ResourceLocation BLACK_HEARTS = new ResourceLocation("xlifehealth:textures/gui/black_hearts.png");
- @SubscribeEvent
- public void drawOverHealthBar(RenderGameOverlayEvent.Pre evt) {
- if(evt.getType().equals(RenderGameOverlayEvent.ElementType.HEALTH)) {
- evt.setCanceled(true);
- client.getTextureManager().bindTexture(BLUE_HEARTS);
- }
- client.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
- }
- public static void setBlueHearts() {
- client.getTextureManager().bindTexture(BLUE_HEARTS);
- }
- public static void setGreenHearts() {
- client.getTextureManager().bindTexture(GREEN_HEARTS);
- }
- public static void setOrangeHearts() {
- client.getTextureManager().bindTexture(ORANGE_HEARTS);
- }
- public static void setPinkHearts() {
- client.getTextureManager().bindTexture(PINK_HEARTS);
- }
- public static void setPurpleHearts() {
- client.getTextureManager().bindTexture(PURPLE_HEARTS);
- }
- public static void setYellowHearts() {
- client.getTextureManager().bindTexture(YELLOW_HEARTS);
- }
- public static void setCyanHearts() {
- client.getTextureManager().bindTexture(CYAN_HEARTS);
- }
- public static void setMagentaHearts() {
- client.getTextureManager().bindTexture(MAGENTA_HEARTS);
- }
- public static void setBlackHearts() {
- client.getTextureManager().bindTexture(BLACK_HEARTS);
- }
- private static Minecraft client = Minecraft.getInstance();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement