Jump to content

adusut

Members
  • Posts

    12
  • Joined

Everything posted by adusut

  1. Hello, I have made a custom jukebox with a GUI. All is working well, but I would like to know if it is possible to get the duration of the record being played. I don't know length of the sounds in the records as the mod user adds their custom sounds. All help is appreciated.
  2. Thanks for all the help everyone I have got the zoom working now, but I'm not too sure on the overlay. I got part of it working however it didn't fit the screen correctly and was not the correct scale etc Just fixed it, all working now, thanks for the help
  3. Hello all, I am currently creating a mod that has guns and would like to be able to create a sniper which has a sight. However, I don't know how to do this or start with it. I have created the gun and the buttons to bring up the scope are done. I would like the know how to be able to bring up a gui (like the pumpkin? not sure if this is the best way around it) with the scope textures and also zoom the camera in. How would I do this, I appreciate all help. Thanks
  4. I have given it a go, but how do I do this for an item?
  5. Hello, just wanted to know if there is a way to import Google SketchUp (or Blender) models into Minecraft? If it's possible, can the models work as items, blocks and mobs? Also, if it is possible, I would love to know how to do it! Thanks!
  6. I have finally got it working and thanks to everyone who helped. I just made my model extend ModelBiped and then copied & edited the code from the RenderSkeleton class, if people were wondering.
  7. Hi, thanks for reply. I just tried that out in my enitymob class but its still not showing up. Do you have anything special in your render class related to this? I'm not sure why it isn't working for me, thanks.
  8. Anyone??? Sorry I am quite new to modding and cannot figure this out.
  9. I just looked in the RenderBiped class and found this: protected void func_130005_c(EntityLiving par1EntityLiving, float par2) { float f1 = 1.0F; GL11.glColor3f(f1, f1, f1); super.renderEquippedItems(par1EntityLiving, par2); ItemStack itemstack = par1EntityLiving.getHeldItem(); ItemStack itemstack1 = par1EntityLiving.func_130225_q(3); float f2; if (itemstack1 != null) { GL11.glPushMatrix(); this.modelBipedMain.bipedHead.postRender(0.0625F); IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D)); if (itemstack1.getItem() instanceof ItemBlock) { if (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())) { f2 = 0.625F; GL11.glTranslatef(0.0F, -0.25F, 0.0F); GL11.glRotatef(90.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(f2, -f2, -f2); } this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack1, 0); } else if (itemstack1.getItem().itemID == Item.skull.itemID) { f2 = 1.0625F; GL11.glScalef(f2, -f2, -f2); String s = ""; if (itemstack1.hasTagCompound() && itemstack1.getTagCompound().hasKey("SkullOwner")) { s = itemstack1.getTagCompound().getString("SkullOwner"); } TileEntitySkullRenderer.skullRenderer.func_82393_a(-0.5F, 0.0F, -0.5F, 1, 180.0F, itemstack1.getItemDamage(), s); } GL11.glPopMatrix(); } if (itemstack != null) { GL11.glPushMatrix(); if (this.mainModel.isChild) { f2 = 0.5F; GL11.glTranslatef(0.0F, 0.625F, 0.0F); GL11.glRotatef(-20.0F, -1.0F, 0.0F, 0.0F); GL11.glScalef(f2, f2, f2); } this.modelBipedMain.bipedRightArm.postRender(0.0625F); GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F); IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED); boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D)); if (itemstack.getItem() instanceof ItemBlock && (is3D || RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))) { f2 = 0.5F; GL11.glTranslatef(0.0F, 0.1875F, -0.3125F); f2 *= 0.75F; GL11.glRotatef(20.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(-f2, -f2, f2); } else if (itemstack.itemID == Item.bow.itemID) { f2 = 0.625F; GL11.glTranslatef(0.0F, 0.125F, 0.3125F); GL11.glRotatef(-20.0F, 0.0F, 1.0F, 0.0F); GL11.glScalef(f2, -f2, f2); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else if (Item.itemsList[itemstack.itemID].isFull3D()) { f2 = 0.625F; if (Item.itemsList[itemstack.itemID].shouldRotateAroundWhenRendering()) { GL11.glRotatef(180.0F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -0.125F, 0.0F); } this.func_82422_c(); GL11.glScalef(f2, -f2, f2); GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F); } else { f2 = 0.375F; GL11.glTranslatef(0.25F, 0.1875F, -0.1875F); GL11.glScalef(f2, f2, f2); GL11.glRotatef(60.0F, 0.0F, 0.0F, 1.0F); GL11.glRotatef(-90.0F, 1.0F, 0.0F, 0.0F); GL11.glRotatef(20.0F, 0.0F, 0.0F, 1.0F); } this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, 0); if (itemstack.getItem().requiresMultipleRenderPasses()) { for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++) { this.renderManager.itemRenderer.renderItem(par1EntityLiving, itemstack, x); } } GL11.glPopMatrix(); } } protected void func_82422_c() { GL11.glTranslatef(0.0F, 0.1875F, 0.0F); } Does this have anything to do with it? And if so, how would I use it to render the item?
  10. How would I do that? In the render class? Thanks
  11. Hello, I have recently created a mob and now I want it to hold an item, e.g sword. I have looked on the internet and in the PigZombie class. I have found this and added it to my code but it doesn't seem to be working: protected void addRandomArmor() { super.addRandomArmor(); this.setCurrentItemOrArmor(0, new ItemStack(Item.swordgold)); I then found this: private static final ItemStack defaultHeldItem; public ItemStack getHeldItem() { return defaultHeldItem; } static { defaultHeldItem=new ItemStack(Item.swordGold, 1); } This also doesn't work. Any help would be appreciated, thanks.
×
×
  • Create New...

Important Information

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