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

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.

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

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

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

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.

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.