Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How to create the regeneration effect on hearts for other HUD elements
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 2
squidlex

How to create the regeneration effect on hearts for other HUD elements

By squidlex, January 26 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

squidlex    4

squidlex

squidlex    4

  • Creeper Killer
  • squidlex
  • Members
  • 4
  • 166 posts
Posted January 26

I have a custom HUD above the hunger bar that I want to imitate the 'wave' effect applied on the player's hearts when they have the regeneration effect.

I've tried to make sense of the Class for this, however it seems incredibly confusing as the variables are very shortly named.

 

Any help would be greatly appreciated!

Of course I'm not asking for someone to do this for me, just if anyone knows any tips or pointers to get me started.

  • Quote

Share this post


Link to post
Share on other sites

Beethoven92    75

Beethoven92

Beethoven92    75

  • Dragon Slayer
  • Beethoven92
  • Members
  • 75
  • 577 posts
Posted January 26

What you did in the first place is correct, as you looked at the vanilla code that obtains this effect for player hearts as an inspiration...of course that code is not very explanatory as you already pointed out so, you could take some time reading it very carefully in order to assess what every line of code exactly does, or you could copy that portion of code in your code and try to play a bit with it to see how things change, and so you can adjust it to your needs

  • Thanks 1
  • Quote

Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port

A little fun project: https://www.curseforge.com/minecraft/mc-mods/two-players-one-horse

Share this post


Link to post
Share on other sites

squidlex    4

squidlex

squidlex    4

  • Creeper Killer
  • squidlex
  • Members
  • 4
  • 166 posts
Posted January 27
19 hours ago, Beethoven92 said:

What you did in the first place is correct, as you looked at the vanilla code that obtains this effect for player hearts as an inspiration...of course that code is not very explanatory as you already pointed out so, you could take some time reading it very carefully in order to assess what every line of code exactly does, or you could copy that portion of code in your code and try to play a bit with it to see how things change, and so you can adjust it to your needs

Thank you!

  • Quote

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 2
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • cadbane86140
      Minecraft: Hunger Games Game #36- Shear FIGHT!

      By cadbane86140 · Posted 1 hour ago

      Hello There! Today we are back on Hunger Games after a little break but we are finally back! In this episode we are on the good ol' map Survival Games 4 and it ACTUALLY went well for once. Also we have so many great battles on rooftops, small rooms and just out in the open! We also use shears to fight at one point and that was pretty crazy! There are so many hilarious moments in this episode that I know you guys are gonna love! I hope you all enjoy this video and if you did don't forget to like and sub for more Hunger Games in the future!  
    • Sad Whale
      Game crashes whenever I try to increase the RAM

      By Sad Whale · Posted 1 hour ago

      latest.log
    • diesieben07
      Game crashes whenever I try to increase the RAM

      By diesieben07 · Posted 1 hour ago

      In the logs folder of your game directory.
    • Unusualty
      GUI'S and player editing

      By Unusualty · Posted 1 hour ago

      So I'm trying to make a mod that is inspired by Origin's because this mod isn't for forge I was wondering if anyone can help me do something like this where you get a GUI when you join the world where you can select a race that has abilities and down sides to them, I also want to have classes but first I want these race's done so if anyone can help this would be appreciated.
    • Sad Whale
      Game crashes whenever I try to increase the RAM

      By Sad Whale · Posted 1 hour ago

      Would you mind explaining where I can find the debug.log
  • Topics

    • cadbane86140
      0
      Minecraft: Hunger Games Game #36- Shear FIGHT!

      By cadbane86140
      Started 1 hour ago

    • Sad Whale
      6
      Game crashes whenever I try to increase the RAM

      By Sad Whale
      Started 2 hours ago

    • Unusualty
      0
      GUI'S and player editing

      By Unusualty
      Started 1 hour ago

    • fluiX
      1
      server wont start

      By fluiX
      Started 3 hours ago

    • Luis_ST
      6
      [1.16.5] Help with custom Event

      By Luis_ST
      Started 7 hours ago

  • Who's Online (See full list)

    • Beethoven92
    • matezz
    • NullDev
    • diesieben07
    • Kawaiialexplays
    • CookieLukas
    • LexManos
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • How to create the regeneration effect on hearts for other HUD elements
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community