Posted October 25, 201510 yr Hello, i want to create a big sword like "The Big Bertha" in orespawn but i don't know how can i create it. If you have an idea please say me. Thank you
October 25, 201510 yr You need to make a model and render it.. Some examples: Put this method @SideOnly(Side.CLIENT) public boolean isFull3D() { return true; } to your Item class. public class RenderEvilStaff implements IItemRenderer { public static ResourceLocation tex = new ResourceLocation(Main.MODID, "textures/models/evilstafftexture.png"); private ModelEvilStaff staff; public RenderEvilStaff() { staff = new ModelEvilStaff(); } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type) { switch(type) { case EQUIPPED: return true; case EQUIPPED_FIRST_PERSON: return true; default: return false; } } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) { return false; } @Override public void renderItem(ItemRenderType type, ItemStack item, Object... data) { switch(type) { case EQUIPPED: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(tex); GL11.glScalef(1.4F, 1.0F, 1.4F); GL11.glRotatef(90, 0F, 1F, 0F); GL11.glRotatef(100, 1F, 0F, 0F); GL11.glRotatef(10, 1F, 0F, 1F); GL11.glTranslatef(0.06F, -1.1F, -0.45F); this.staff.renderModel(0.0625F); GL11.glPopMatrix(); } case EQUIPPED_FIRST_PERSON: { GL11.glPushMatrix(); Minecraft.getMinecraft().renderEngine.bindTexture(tex); GL11.glScalef(1.4F, 1.0F, 1.4F); GL11.glRotatef(90, 0F, 1F, 0F); GL11.glRotatef(100, 1F, 0F, 0F); GL11.glRotatef(10, 1F, 0F, 1F); boolean isFirstPerson = false; if(data[1] != null && data[1] instanceof EntityPlayer) { if(!((EntityPlayer)data[1] == Minecraft.getMinecraft().renderViewEntity && Minecraft.getMinecraft().gameSettings.thirdPersonView == 0 && !((Minecraft.getMinecraft().currentScreen instanceof GuiInventory || Minecraft.getMinecraft().currentScreen instanceof GuiContainerCreative) && RenderManager.instance.playerViewY == 180.0F))) { GL11.glTranslatef(0.06F, -1.1F, -0.45F); }else{ isFirstPerson = true; } }else{ GL11.glTranslatef(0.06F, -1.1F, -0.45F); } this.staff.renderModel(0.0625F); GL11.glPopMatrix(); } default: break; }} Then render your model. (You can adjust the size and rotation and stuff with the GL11 methods.)
October 25, 201510 yr Well, just put this to your main class. It will run the renderer and will render the item. If you don't understand Java, please learn before copy-pasting. And after you know the basics, try to understand the example code I send you. It's the best way to learn how to mod/code and customize your mod however you want. MinecraftForgeClient.registerItemRenderer(Main.evilStaff, (IItemRenderer)new RenderEvilStaff()); Make sure you put this code in the init section.
October 25, 201510 yr Or, you could update to 1.8 and then it's simply a matter of changing the scale in the Item's .JSON model... can't get much easier than that http://i.imgur.com/NdrFdld.png[/img]
October 25, 201510 yr no offense intended, but i think this is the easy way out since he didn't understand what the client proxy and renderer meant. updating to 1.8 seems to be the harder way out
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.