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

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
mcfrei

Seems that NOT registering RenderPlayerTFC in RenderingRegistry breaks compatibility with SmartMoving mod for rendering barrel

6 posts in this topic

Hello, respected mod developer Kittychanley.

Sorry for getting technical right from the start, but i'm trying to increase compatibility with Smart Moving using RenderPlayerAPIEnchancer. 

I tried to investigate that barrel bug again and stumbled upon strange commit that removes registration of RenderPlayerTFC in RenderingRegistry. But Smart Moving hooks to registered classes only, when changing rendering. 

Is this commit still actual after barrel/quiver slot was rewritten?

Can PlayerRenderHandler class, maybe, be incorporated in RenderPlayerTFC and the latter be registered in RenderingRegistry again? Or maybe it is not even needed and registration can simply be uncommented?

Do you remember the reasons why it was commented?

Thank you for giving an answer and for an amazing mod.

Edited by mcfrei
added ending
0

Share this post


Link to post
Share on other sites

So RenderPlayerTFC actually isn't used anywhere in our code anymore. If you un-comment that line out, the player's armor won't render properly when they are sneaking.

Is there a key difference between RenderingRegistry.registerEntityRenderingHandler and MinecraftForge.EVENT_BUS.register?

0

Share this post


Link to post
Share on other sites

Yes, second does not seem to pass through  RenderPlayerAPIEnchancer hooks that allow acquiring new coordinates from Smart Moving instead of vanilla API. How exactly does player armor not render properly? Do you have a screenshot?

There is a condition for RenderPlayerAPI to override inheritance. To be compatible with smart moving the class that is rendering the armor and other stuff has to inherit from net.minecraft.client.model.ModelBiped, so RenderPlayerTFC is not an issue here anyway.

Up: upon further investigation, seems that RenderPlayerTFC has nothing to do with player at all - it was only enchancing rendering of the item stands. Could you please point me to the class where rendering of item on the back (anvils, barrels, etc) is set up, so i would try to understand what's going on?

Edited by mcfrei
more investigation
0

Share this post


Link to post
Share on other sites
Quote

Is there a key difference between RenderingRegistry.registerEntityRenderingHandler and MinecraftForge.EVENT_BUS.register?

Yes, the difference seems to be not the register method, but specific class inheritance - from ModelPlayerBase or ModelPlayer, and using the renderModel override, like in GalacticCraft for RenderPlayer and ModelPlayer. (although i don't understand thorougly what exactly happens in those classes, seems that  createModelRenderer is the thing that defines where to render stuff - on the body or on the head, and SmartMoving is only referenced in the static constructor)

I could be wrong though, i'm fairly new to the minecraft forge mods. I am very grateful for your quick answer, and hope that you find this interesting.

Edited by mcfrei
more links
0

Share this post


Link to post
Share on other sites

Share this post


Link to post
Share on other sites

Thank you. I will work on a pull-request or a patch of some sort.

0

Share this post


Link to post
Share on other sites