Jump to content

Quick Questions regarding custom mod


Heltrato

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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... 

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
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.
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...

×   Pasted as rich text.   Restore formatting

  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.

Announcements



×
×
  • Create New...

Important Information

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