Posted May 29, 201213 yr How would I create a custom Item Renderer? I've looked for tutorials and no one seems to have done it before... My tile entity is basically shaped exactly like a block. The reason why I am using a custom render is because the textures will change without the metadata or the block changing (hence it will update the texture). More about this here: http://minecraftforge.net/forum/index.php/topic,244.msg1589.html How can I render the item to be just like a normal block instead of becoming a flat piece of texture when I set the renderType in the block to -1? I see that the enchantment table seems to have created their item texture file based on the enchantment table block. How do they do this? http://calclavia.com/uploads/banner.png[/img]
May 30, 201213 yr Author Ok since there was no response I looked around and found this function called ModLoader.renderInvsBlock(). The java doc says it will render a block in the inventory. I am not sure how this function can be called to work. Anyone can help? http://calclavia.com/uploads/banner.png[/img]
May 31, 201213 yr Author Right. I found a way but it requires modifying base files of the Render class. I had to add a new render number to make the item render as a block instead of a flat texture =_= Is there a way to do this withou modifying base files? http://calclavia.com/uploads/banner.png[/img]
May 31, 201213 yr .... There are plunty of tutorials for this crap out there, Go look at ModLoader.getNextBlockModelID I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
May 31, 201213 yr Author .... There are plunty of tutorials for this crap out there, Go look at ModLoader.getNextBlockModelID I looked at ModLoader.getUniqueBlockModelID. I am not sure how I can assign my block renderer to render that specific block. Also I did a bunch of searching about this topic on Google and there doesn't seem to be tutorial that is really relevent. It would be great if you could provide me with a link to one. Sorry if the questions are very noob to you. I am not an experienced modder afterall. This is the closest thing I found: http://www.minecraftforum.net/topic/946596-modloader-using-a-custom-2d-texture-for-a-customly-rendered-block/ Is the renderInvBlock function supposed to be in the BaseMod/NetworkMod? http://calclavia.com/uploads/banner.png[/img]
May 31, 201213 yr Though forge had something for this. Saw this in the player render class might lead you too something. 179 IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var3, EQUIPPED); http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
May 31, 201213 yr Author THANKS! renderInvBlock function worked perfectly! http://calclavia.com/uploads/banner.png[/img]
June 2, 201213 yr Author Right. I still can not render the item properly. The problem is I don't know how to bind a texture to an item render. I have a 3D model. It has a unique texture file for it. I can call the model render function from Base Mod's "renderInvBlock" function. The problem is I do not know how to specify a texture to the specific model to be rendered... Also, I can not use the function getTextureFile from forge because my texture file depends on the metadata and getTextureFile seems to not be metadata sensitive. Help would be appreciated. http://calclavia.com/uploads/banner.png[/img]
June 2, 201213 yr Author Though forge had something for this. Saw this in the player render class might lead you too something. 179 IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(var3, EQUIPPED); I am currently trying that approach. But I still don't know where I can set the texture for that render... I got this so far... It's kinda funny that the missile launcher is big, I will fix that soon. But the problem here is that my different missile launchers have different texture files and they all use the same block... http://calclavia.com/uploads/banner.png[/img]
June 4, 201213 yr That... looks very very nice. I always like it when mods have 3D model that are not block shaped. And is that a radar disk over there http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
June 4, 201213 yr Author Yes you will see that in the next version of the mod although it doesn't actually work yet. http://calclavia.com/uploads/banner.png[/img]
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.