Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      Server Move   09/13/18

      I (Dries007) have recently taken over as main developer and server admin. This involved moving servers to reduce cost. It's likely there will be some more downtime in the future but most  things should be sorted by now. This forum is in dire need of replacement as the software is quite old and can't be easily updated. If you wish to discuss or stay updated, join our discord: https://invite.gg/terrafirmacraft. The forum will remain available to read, but will be locked in the future, when a new system is setup. The forum and wiki are now ad free. If you'd like to contribute to keeping it that way, you can do so via paypal or patreon.
TaeoG

Custom Armor Types

5 posts in this topic

So I'm working to make an intercompatibility mod, and I had intended to port the other mod's armor over to the TFC armor system. But the Armor class in the api has private constructors! How do I go about adding new armors? Is there some trick I'm missing?

0

Share this post


Link to post
Share on other sites

I don't know if it will let you use reflection to access the private constructor. If not, then you will have to use bytecode manipulation to flip a private, bytecode injection to add your armors to that class, or submit a pull request to change it. Here is a paste of the reflection code I used when trying to do this, and it seems to work, but I ran into another issue so I don't know for sure.

0

Share this post


Link to post
Share on other sites

ya, I used a reflection, I was just hoping a hack like that wouldn't be necessary. Works fine, but I would have preferred to be told I just overlooked an API function, haha.

0

Share this post


Link to post
Share on other sites

The constructors being private is a mistake that honestly nobody has pointed out until now. They've been switched to public.

1

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