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

So, I made a bow for my mod and used "this.setFull3D();" in the constructor to make it render in 3d, but the offset seems to be off.

width=800 height=449https://lh3.googleusercontent.com/JfBd59Gq_0ML6qYQmjeVlz2VZD35jWjsdK54AZt1PXyAOk5EkY7XHph2VisVcAesgloMTOv7jMDt3II=w1256-h817[/img]

 

The textures should be fine because all I did was edit the colors of the vanilla bow in paint.net.

Does anyone have a solution?

Here is the vanilla bow for comparison:

 

width=800 height=449https://lh3.googleusercontent.com/NmVAXlRtvEo2l43A2N8EPTyDvoABZbEnWpuQHCXth8zcnyXmanrjvywWyTBjQXJSxIjBmBidsFT6TiU=w1256-h817[/img]

Ok, now that we can seethe problems, show us the item render code if you are pre-1.8 or item JSON for 1.8.

If my post helped you, please press that "Thank You"-button to show your appreciation.

 

Also if you don't know Java, I would suggest you read the official tutorials by Oracle to get an idea of how to do this. Thanks, and good modding!

 

Also if you haven't, set up a Git repo for your mod not only for convinience but also to make it easier to help you.

  • Author

Ok, now that we can seethe problems, show us the item render code if you are pre-1.8 or item JSON for 1.8.

 

I'm in minecraft 1.7.10 and I am merely using "this.setFull3D();" in my bow constructor.


@Override
public boolean isFull3D() 
{
return true;
}

// BSc CIS, hardcore gamer and a big fan of Minecraft.

 

TmzOS ::..

  • Author

I think the problem is that when I use "this.setFull3D();" It is rendering the bow in hand like a sword istead of like a bow. Is there a way to change the hold type or something?

  • Author

Please, does anyone know how to get the player to hold my bow like a bow instead of like a sword?

Bow rendering is handled specially by Minecraft, so if you want your bow to render in the same fashion, you need to create a custom render class that copies what Minecraft does.

 

Look at the item rendering class and search for bow, then create an IItemRenderer for your item.

  • Author

Bow rendering is handled specially by Minecraft, so if you want your bow to render in the same fashion, you need to create a custom render class that copies what Minecraft does.

 

Look at the item rendering class and search for bow, then create an IItemRenderer for your item.

 

Do I have to call that class the proxies or something? Thank you by the way!

If you search for IItemRenderer or 'Minecraft custom item rendering' in Google or something, you are bound to come up with some tutorials on how to use them.

 

You do need to register the renderer for your Item class in the ClientProxy (or at least called from there):

MinecraftForgeClient.registerItemRenderer(YourMod.yourItem, new RenderYourItem());

  • Author

If you search for IItemRenderer or 'Minecraft custom item rendering' in Google or something, you are bound to come up with some tutorials on how to use them.

 

You do need to register the renderer for your Item class in the ClientProxy (or at least called from there):

MinecraftForgeClient.registerItemRenderer(YourMod.yourItem, new RenderYourItem());

 

So this is what I have so far:

 

public class RenderItem implements IItemRenderer {

@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type)
{
	switch(type){
	case EQUIPPED:
		return true;
	default:
		return false;
	}
}

@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
	return false;
}

@Override
public void renderItem(ItemRenderType type, ItemStack itemStack, Object... data) {
	switch(type){
	case EQUIPPED:
		GL11.glPushMatrix();

                        	//I don't know what to put here...

		GL11.glPopMatrix();
	default:
		break;
	}
}

}

 

I'm sorry, i'm new to rendering.

Bow rendering is handled specially by Minecraft, so if you want your bow to render in the same fashion, you need to create a custom render class that copies what Minecraft does.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.