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

1.) Is it possible i could run "Damage Indicator" mod for my eclipse workspace?

 

2.) How is ISpecialArmor implement and what are the important methods (can explain how? )

  • Author
1 hour ago, diesieben07 said:

Yes.

 

You implement it on your item class. The methods have extensive Javadocs, if you have specific questions, please ask.

 

Okay, i think i got the ISpecialArmor now, only 3 important methods, the display,properties,apply.. And somehow its additive to the EnumArmorMaterial.

 

One last additional question...

 

- Why is that the maximum health for every mob is only 1024? (in previous MC Version we can go way higher than that am if not mistaken ).

Is there a way i can exceed it?

  • Author
32 minutes ago, diesieben07 said:

The maximum value is set in SharedMonsterAttributes.MAX_HEALTH. It is not really viable to change it.

Then i shall create custom Attribute then?

  • Author
2 hours ago, diesieben07 said:

You could, yes. But you'd be incompatible with pretty much everything which tries to access max health.

Whuuuuuuuuuuuuuuuuuuuuuuuttttttttttt????????????????????????????????? Why how why :( is there no safest hack to do with that?

 

Also i stumbled across this tutorial 

its pretty much he just made variable with regards the IAttribute system

Edited by Heltrato
fixes

You could (instead of attempting to hack max health) try to reduce damage taken by this entity, so that it simulates having more health than it actually has... 

Simplest (but definitly not a good way to do that (I think theres probably a callback for that, because I haven't worked with any LivingEntity yet I have no clue how the callback is called) way would be to intercept LivingAttackEvents and reduce any damage done to your Entity. You would have to evaluate that depending on how much you want to scale it up... 

  • Author
1 hour ago, Major Tuvok said:

You could (instead of attempting to hack max health) try to reduce damage taken by this entity, so that it simulates having more health than it actually has... 

Simplest (but definitly not a good way to do that (I think theres probably a callback for that, because I haven't worked with any LivingEntity yet I have no clue how the callback is called) way would be to intercept LivingAttackEvents and reduce any damage done to your Entity. You would have to evaluate that depending on how much you want to scale it up... 

as a temporary resolve i might do that, but il try to hack still, maybe Reflection API?

Changing the health system is not really complicated as most times the LivingHurtEvent is called. You could simply make a Capability that stores your entities health and substract the given amount. Then you set the amount to something near 0 so that the actual health doesnt matter. But I think this is to complicated for this simple thing. 

Or as Major Tuvok said subscribe to LivingHurtEvent, test if your conditions are given and then multiply the amount by something smaller than 1.

  • Author
17 hours ago, ArmamentHaki said:

Changing the health system is not really complicated as most times the LivingHurtEvent is called. You could simply make a Capability that stores your entities health and substract the given amount. Then you set the amount to something near 0 so that the actual health doesnt matter. But I think this is to complicated for this simple thing. 

Or as Major Tuvok said subscribe to LivingHurtEvent, test if your conditions are given and then multiply the amount by something smaller than 1.

Solved, i did have 3 multiple instances health bar for monsters, but since my mod have lots of features, it still making it more derpy or unbalance looking. So what i did is i just bypassed it with Reflection API.  Solve btw.

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.