Posted December 28, 201410 yr 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?
December 28, 201410 yr 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
December 28, 201410 yr Author Great idea, what a shame that I didn't figure it out but anyway, I begin porting it. Thanks.
December 29, 201410 yr 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?
December 29, 201410 yr Hi It's not possible yet unless you convert your model to the IBlockModel format. See here for more information: http://greyminecraftcoder.blogspot.com.au/2014/12/item-rendering-18.html -TGG
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.