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
  • Quick Questions regarding custom mod
The update for 1.13 is being worked on - please be patient. (Updated 02/19/19)
1.13 Update Notes for Mod Creators
Sign in to follow this  
Followers 0
Heltrato

Quick Questions regarding custom mod

Started by Heltrato, January 2, 2018

11 posts in this topic

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
  • Report post
Posted January 2, 2018

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? )

Share this post


Link to post
Share on other sites

diesieben07    6114

diesieben07

diesieben07    6114

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6114
  • 40244 posts
  • Report post
Posted January 2, 2018
3 hours ago, Heltrato said:

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

Yes.

 

3 hours ago, Heltrato said:

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

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

  • Like 1

Share this post


Link to post
Share on other sites

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
  • Report post
Posted January 2, 2018
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?

Share this post


Link to post
Share on other sites

diesieben07    6114

diesieben07

diesieben07    6114

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6114
  • 40244 posts
  • Report post
Posted January 2, 2018

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

Share this post


Link to post
Share on other sites

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
  • Report post
Posted January 2, 2018
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?

Share this post


Link to post
Share on other sites

diesieben07    6114

diesieben07

diesieben07    6114

  • Reality Controller
  • diesieben07
  • Forum Team
  • 6114
  • 40244 posts
  • Report post
Posted January 2, 2018

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

Share this post


Link to post
Share on other sites

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
  • Report post
Posted January 2, 2018 (edited)
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 January 2, 2018 by Heltrato
fixes

Share this post


Link to post
Share on other sites

Major Tuvok    0

Major Tuvok

Major Tuvok    0

  • Stone Miner
  • Major Tuvok
  • Members
  • 0
  • 62 posts
  • Report post
Posted January 2, 2018

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

Share this post


Link to post
Share on other sites

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
  • Report post
Posted January 2, 2018
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?

Share this post


Link to post
Share on other sites

ArmamentHaki    2

ArmamentHaki

ArmamentHaki    2

  • Creeper Killer
  • ArmamentHaki
  • Members
  • 2
  • 114 posts
  • Report post
Posted January 2, 2018

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.

Share this post


Link to post
Share on other sites

Heltrato    1

Heltrato

Heltrato    1

  • Diamond Finder
  • Heltrato
  • Members
  • 1
  • 258 posts
  • Report post
Posted January 3, 2018
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0
Go To Topic Listing Modder Support

  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • LexManos
      1.13.2-25.0.45 fails to install

      By LexManos · Posted 5 minutes ago

      Re download the installer, jenkins fucked up, I re-ran the build.
    • LexManos
      Cant instal Latest Ver 1.13.2-25.0.4

      By LexManos · Posted 5 minutes ago

      Re download the installer, Jenkins fucked up,I re-ran the build.
    • 20LeeBrian1
      I can't run forge jar file

      By 20LeeBrian1 · Posted 39 minutes ago

      Since I am new here, I have no idea what the EAQ thread means, so all right then.
    • MewPixelstarz
      Help Please

      By MewPixelstarz · Posted 1 hour ago

      It says downloading minecraft server failed invalid e-tag checksum.
    • Cadiboo
      Error when installing forge-1.13.2-25.0.45-installer

      By Cadiboo · Posted 1 hour ago

      Update it, you’re nearly 200 versions behind
  • Topics

    • CJWilk
      3
      1.13.2-25.0.45 fails to install

      By CJWilk
      Started 12 hours ago

    • playerk125
      3
      Cant instal Latest Ver 1.13.2-25.0.4

      By playerk125
      Started 14 hours ago

    • 20LeeBrian1
      22
      I can't run forge jar file

      By 20LeeBrian1
      Started February 16

    • MewPixelstarz
      11
      Help Please

      By MewPixelstarz
      Started 1 hour ago

    • RedBullSlurpie
      5
      Error when installing forge-1.13.2-25.0.45-installer

      By RedBullSlurpie
      Started 6 hours ago

  • Who's Online (See full list)

    • MewPixelstarz
    • LexManos
    • zbk
    • DaemonUmbra
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Quick Questions regarding custom mod
  • Theme
  • Contact Us

Copyright © 2017 ForgeDevelopment LLC Powered by Invision Community