Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I want to turn the health system into numbers rather than hearts, for example 1000 HP instead of 10 hearts.

 

How would I do this?

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

  • Author

But doest the heart system run on 1-20? That would mean the only numbers being displayed are 50, 100, 150 etc. I don't want it to be multiples of 50

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

There are like 5 ways of touching this. Some of them were used in old days (pre 1.6), some are quite new.

 

You can: (listing most "sane", others are CoreMod-ASM and reflection)

1. Set health attribute of entity to something else on EntityJoinedWorldEvent. That "something else" has to be saved separately in IEEP.

2. Add modifiers to health.

3. Operate on floating point - health is nothing but float - you can make 20.0F be whatever you want. It's just a value. Problem lies rather in vanilla - I am not sure - it might be (almost sure) that vanilla trims float to int at some point (to make full numbers). If that is the case you can't really do anything with floats.

 

In any of those ways you will most certainly run into fact that you WILL have to alter whole damage system.

 

EDIT

Note that while modifiers are synchronized internally, no matter what you do with them - changing BASE value of attribute is NOT.

BASE value is set only only during constructing, if you decide to alter it - you will need to send packet to clients (all) about it. You will (probably) also need to send packet to all others that will "soon start to track" given entity #dynamicUpdates #startTrackingEvent

1.7.10 is no longer supported by forge, you are on your own.

Integer health is only used for the overlay. The health float is fully saved and maintained, due to weakness portions dropping unarmed damage below half of a heart.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.