Posted August 18, 201510 yr So I guess I have a few things I need to ask, but first something I would like to note that I am still learning rendering and though most makes sense to me I am still lost on a few things. Now for the questions/problem is that my Scythe that extends ItemSword when rendered looks like the player is holding it by the shoulder in 3rd person view, on my quest to fix this I got this. public class ScytheRenderer implements IItemRenderer { private static RenderItem renderItem = new RenderItem(); @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type == ItemRenderType.EQUIPPED; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { IIcon icon = item.getIconIndex(); GL11.glPushMatrix(); renderItem.renderIcon(0, 0, icon, 64, 64); GL11.glScalef(0.8f, 0.8f, 0.8f); GL11.glPopMatrix(); } } With this the moment I go into 3rd person view it doesn't show item until I fly up and then it will show this large version of the item and the player holding it by the blade. My first endeavor to fix this was to change the scaling of it to a more reasonable size then to change the rotation and translation, but GL11.glScalef(0.8f, 0.8f, 0.8f); is not doing anything no matter how much I change it. My second question is involving something I have not made yet, what I am planing is to make a gauntlet that will have its own model. In 3rd person view I want it to look like its on the player arm, will I need to just translate the item to the players arm? For the next part I want the first person view to have it look like its part of the player(slimier to the witches hand from witchery), would I need to just do a translate/rotation to achieve this? My third question is more or less about rendering, I want to make an item either a bauble or not, will render wings on the back of the player. I do know there is a bauble render that can be implement into the item its self and from there render what I want, but that's not really what I am asking. I was wondering if I wanted these wings to look animated if they need to me a entity or not? ~SureShotM/Leo~ gaming coding all around fun!
August 19, 201510 yr Author The solution is probably the most simple, I guess I am going at this all wrong though. ~SureShotM/Leo~ gaming coding all around fun!
August 19, 201510 yr Seriously, just google IItemRenderer tutorial. 1. Inside your render methods you have ItemRenderType - you need to make switch or if statements for each type you want to handle. For 3rd or 1st person the rendering is different. You will need scaling/translating that will fit given type. 2. Yes, just that. 3. "bauble" - meaning? What - jewelery? Overally - R.I.P english, bruh. http://i1276.photobucket.com/albums/y465/Ameer_da_Gilgamesh/elvish-math_zps27b2be3a.jpg[/img] 1.7.10 is no longer supported by forge, you are on your own.
August 19, 201510 yr Author Seriously, just google IItemRenderer tutorial. 1. Inside your render methods you have ItemRenderType - you need to make switch or if statements for each type you want to handle. For 3rd or 1st person the rendering is different. You will need scaling/translating that will fit given type. 2. Yes, just that. 3. "bauble" - meaning? What - jewelery? Overally - R.I.P english, bruh. http://i1276.photobucket.com/albums/y465/Ameer_da_Gilgamesh/elvish-math_zps27b2be3a.jpg[/img] 1. @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { return type == ItemRenderType.EQUIPPED; } as you can see I am just doing it for the one type but the scythe still looks huge unless I need the statement in the renderItem() to check the type. 2.Okay so gauntlet part will be easy 3.Bauble is from Azanor's mod Bauble, witch is extra equipment(jewelry). I also want to note that the scythe does not have a model and is only using the basic vanilla stuff. ~SureShotM/Leo~ gaming coding all around fun!
August 19, 201510 yr Author I am just going to make a model for the scythe as well, that should fix my issue. ~SureShotM/Leo~ gaming coding all around fun!
August 19, 201510 yr Author Okay back to scrap cause I cant model worth shit and my college is out for a few, So back to the scythe the scaling wont change no matter what I put into it same with any of the gl stuff. I do have the icon being registered but i have a felling I am doing it wrong. @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { IIcon icon = item.getItem().getIcon(item, 0); GL11.glPushMatrix(); renderItem.renderIcon(0,0, icon, 6,6); GL11.glScalef(10.0f, 10.0f, 10.0f); //GL11.glTranslatef(0.0f, 1.0f, 0.0f); GL11.glPopMatrix(); } ~SureShotM/Leo~ gaming coding all around fun!
August 20, 201510 yr Scaling and Translating should be done before the the render code is called. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
August 21, 201510 yr Author Scaling and Translating should be done before the the render code is called. Of course the easy and most simplistic thing. ~SureShotM/Leo~ gaming coding all around fun!
August 24, 201510 yr And you are rendering the item before scaling and translating in the code you posted. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
August 24, 201510 yr Author Yah its all working now thank you Abastro. ~SureShotM/Leo~ gaming coding all around fun!
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.