Jump to content

1.11.2 Armor attributes not updating


Socratic_Phoenix

Recommended Posts

Basically, I've got this armor item that has attributes (toughness and damage reduction) that can change depending on various stuffs. The attributes appear to change successfully, showing up differently in the item's lore, however, when I put the armor on, the gui shows the armor bar with an unchanged damage reduction, and the armor itself does not provide the proper amount of damage reduction... I'm having trouble figuring out where else the game could be getting the armor's information from, since I can't find any usages of the methods that access the unchanged damage reduction that do anything more than play a sound... The class I'm using is below:

https://github.com/SocraticPhoenix/Randores/blob/master/src/main/java/com/gmail/socraticphoenix/forge/randore/item/FlexibleItemArmor.java#L167

If anyone knows what method I need to override, or if I need to update some data somehow, that'd be really helpful. Thanks for any replies.

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

Link to comment
Share on other sites

7 hours ago, Leomelonseeds said:

 

You could use the onArmorTick method.

 

To do what, exactly? My problem is that I don't know how to update the armor's attributes, or why they're not just updating by themselves...

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

Link to comment
Share on other sites

Turns out I just had to implement ISpecialArmor

Developer of Randores (adds 256^3 ores to the game) and Arcane Bags (adds ridiculous storage with ridiculous crafting recipes).

I know Java pretty well... So yeah...

Quote

This is where I'd put an inspirational and/or clever quote, but I can't think of one right now...

This is the output of the totally, 100% working compiler for my programming language, Planet9:

Beginning Compilation...
Failed compilation!
planet9.compiler.error.CompilationException: Compiler not yet implemented
	at planet9.compiler.Compiler.compile(Compiler.java:39)
	at planet9.compiler.app.CompilerApp.main(CompilerApp.java:147)

 

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.