Advertisement
jayhillx

heartcolors

Oct 20th, 2020
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. public class HeartColors extends AbstractGui {
  2.  
  3. public static final ResourceLocation BLUE_HEARTS = new ResourceLocation("xlifehealth:textures/gui/blue_hearts.png");
  4. public static final ResourceLocation GREEN_HEARTS = new ResourceLocation("xlifehealth:textures/gui/green_hearts.png");
  5. public static final ResourceLocation ORANGE_HEARTS = new ResourceLocation("xlifehealth:textures/gui/orange_hearts.png");
  6. public static final ResourceLocation PINK_HEARTS = new ResourceLocation("xlifehealth:textures/gui/pink_hearts.png");
  7. public static final ResourceLocation PURPLE_HEARTS = new ResourceLocation("xlifehealth:textures/gui/purple_hearts.png");
  8. public static final ResourceLocation YELLOW_HEARTS = new ResourceLocation("xlifehealth:textures/gui/yellow_hearts.png");
  9. public static final ResourceLocation CYAN_HEARTS = new ResourceLocation("xlifehealth:textures/gui/cyan_hearts.png");
  10. public static final ResourceLocation MAGENTA_HEARTS = new ResourceLocation("xlifehealth:textures/gui/magenta_hearts.png");
  11. public static final ResourceLocation BLACK_HEARTS = new ResourceLocation("xlifehealth:textures/gui/black_hearts.png");
  12.  
  13. @SubscribeEvent
  14. public void drawOverHealthBar(RenderGameOverlayEvent.Pre evt) {
  15. if(evt.getType().equals(RenderGameOverlayEvent.ElementType.HEALTH)) {
  16. evt.setCanceled(true);
  17. client.getTextureManager().bindTexture(BLUE_HEARTS);
  18. }
  19. client.getTextureManager().bindTexture(AbstractGui.GUI_ICONS_LOCATION);
  20. }
  21.  
  22. public static void setBlueHearts() {
  23. client.getTextureManager().bindTexture(BLUE_HEARTS);
  24. }
  25. public static void setGreenHearts() {
  26. client.getTextureManager().bindTexture(GREEN_HEARTS);
  27. }
  28. public static void setOrangeHearts() {
  29. client.getTextureManager().bindTexture(ORANGE_HEARTS);
  30. }
  31. public static void setPinkHearts() {
  32. client.getTextureManager().bindTexture(PINK_HEARTS);
  33. }
  34. public static void setPurpleHearts() {
  35. client.getTextureManager().bindTexture(PURPLE_HEARTS);
  36. }
  37. public static void setYellowHearts() {
  38. client.getTextureManager().bindTexture(YELLOW_HEARTS);
  39. }
  40. public static void setCyanHearts() {
  41. client.getTextureManager().bindTexture(CYAN_HEARTS);
  42. }
  43. public static void setMagentaHearts() {
  44. client.getTextureManager().bindTexture(MAGENTA_HEARTS);
  45. }
  46. public static void setBlackHearts() {
  47. client.getTextureManager().bindTexture(BLACK_HEARTS);
  48. }
  49.  
  50. private static Minecraft client = Minecraft.getInstance();
  51. }
  52.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement