Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Does anyone know if AdvancedModelLoader will be in Forge 1.8 and is there any interface that I could use to render items and blocks Wavefront models?

Hi

 

I don't know when Lex plans to add AdvancedModelLoader back in; if you have some experience you could add it yourself, I can't imagine it will be very complicated since it's the same OpenGL renderering as before, just needs adaption to the new Tessellator (WorldRenderer) classes.

 

At the moment I think the only way to custom render blocks and items is to use ASM/Reflection to modify the vanilla rendering classes, for example overriding Block.getRenderType() to return (eg) 4, and then modifying eg BlockRendererDispatcher:

    public boolean renderBlock(IBlockState p_175018_1_, BlockPos p_175018_2_, IBlockAccess p_175018_3_, WorldRenderer p_175018_4_)
    {
        try
        {
            int i = p_175018_1_.getBlock().getRenderType();

            if (i == -1)
            {
                return false;
            }
            else
            {
                switch (i)
                {
                    case 1:
                        return this.fluidRenderer.renderFluid(p_175018_3_, p_175018_1_, p_175018_2_, p_175018_4_);
                    case 2:
                        return false;
                    case 3:
                        IBakedModel ibakedmodel = this.getModelFromBlockState(p_175018_1_, p_175018_3_, p_175018_2_);
                        return this.blockModelRenderer.renderModel(p_175018_3_, ibakedmodel, p_175018_1_, p_175018_2_, p_175018_4_);

// add case 4: here
                    default:
                        return false;
                }
            }
        }

 

I imagine Forge will be updated to add the equivalent of the old ISBRH and IItemRenderer if enough people ask; don't know when though.  You could ask on the suggestions forum.

 

AFAIK TileEntitySpecialRenderers should still work, you would just need to port the AdvancedModelLoader across :)

 

-TGG

 

 

 

  • Author

Great idea, what a shame that I didn't figure it out :) but anyway, I begin porting it. Thanks.

  • Author

Ok... so I now have new AdvancedModelLoader and I'm able to render tileentities but still have problem with rendering custom models as items and inventory icons. Does anyone know how it should be done without using ASM or reflections?

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

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.