[SOLVED] Helmet slot damage detection problem (custom code)

Started by Mortimer Kerman on

Topic category: Advanced modding

Last seen on 10:47, 24. Oct 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Helmet slot damage detection problem (custom code)
Fri, 02/12/2021 - 07:06 (edited)

Hello,

I have a problem: I'd like to set a variable "Mask" to a number that depends on the damage of a piece of armor (the helmet). I almost finished the code, but the checker I put did not work. Could someone help me to correct the problem? Thank you in advance. Sorry for the gross mistakes. Line to be corrected:

	MineterstellarVariables.mask = (double) (itemstack.getItemDamage());

The name of armor is:

 

mineterstellar.item.ItemSpacesuit

 

ItemSpacesuit.helmet

 

PS: My mod is for 1.12.

Edited by Mortimer Kerman on Fri, 02/12/2021 - 07:06
Last seen on 10:47, 24. Oct 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just found how to do this…
Fri, 11/13/2020 - 13:26

I just found how to do this.

Just use armor ticks.