Posted April 20, 201411 yr Yep. I have been searching all over the Internet for hours, with no success on finding a 1.7.2 tutorial on how to make your items have a 3D model using Techne. I've already made the model for it (which is here:http://techne.zeux.me/76fd6249). All I could find were either 1.6 (or earlier) tutorials or ones for mobs. So, if anyone could offer any sites or anything then that would be great, or tell me if it's even possible in 1.7. Thanks in advance.
April 20, 201411 yr I looked around in the code, and there's an IItemRenderer class. You can make a class that implements it, and register it in the MinecraftForgeClient class. Kain
April 20, 201411 yr http://www.minecraftforge.net/forum/index.php/topic,18439.0.html Might be some help. In the renderItem do: FMLClientHandler.getClient().getMinecraft().renderEngine/textureManager.bindTexture(resourceloc); //or something like that GL11.glPushMatrix(); GL11.glTranslatef(); GL11.glScalef(); GL11.glRotatef(); itemModel.render(size); //0.0625 GL11.glPopMatrix(); Hope that helps My mod for futher awesomeness: http://www.minecraftforum.net/topic/1714396-the-decopack-collection-v010-wip-made-a-signature-new-snapshot-1-screenshots-are-up-small-snapshot-1-is-out-for-147/#entry21250399
April 21, 201411 yr Pretty sure this will work accompanied with the appropriate model files and stuff http://www.youtube.com/watch?v=pY2kgGa70Z4 <- this link is slightly outdated but if you follow it you should be able to figure out the concepts quite easily im pretty sure aside from the file below it requires similar files to rendering a block model package com.WHATEVER.ItemRender; imports @SideOnly(Side.CLIENT) public class ItemWHATEVERItemRender implements IItemRenderer { private TileEntityItemWHATEVER tile = new TileEntityItemWHATEVER (); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch (type) { case ENTITY: return true; case EQUIPPED: return true; case EQUIPPED_FIRST_PERSON: return true; case INVENTORY: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item,ItemRendererHelper helper) { return true; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { ItemWHATERVERModel model = new ItemWHATERVERModel (); GL11.glPushMatrix(); if(type == ItemRenderType.EQUIPPED_FIRST_PERSON){ GL11.glTranslatef((float) 0.5F, (float) 1.8F, (float) 0.5F); }else{ GL11.glTranslatef((float) 0.5F, (float) 1.4F, (float) 0.5F); } Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(TEXTURE FILE PATH)); GL11.glPushMatrix(); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); model.render((Entity)null, 0.0F, 0.0F, -0.1F, 0.0F, 0.0F, 0.0625F); GL11.glPopMatrix(); GL11.glPopMatrix(); } } EDIT: http://greyminecraftcoder.blogspot.com.au/2013/09/custom-item-rendering-using.html helps out perfectly
April 21, 201411 yr Yeah, that video I made isn't perfect, I've been meaning to update it, because there are some flaws with it, like using switch statements instead of if statements, etc. So, your best bet would be TGG's blog for now.
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.