Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Adding a 1.7 3D Item Model


TheUltraDragonCow
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

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