Jump to content

ProgrammerCam

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by ProgrammerCam

  1. Guys i don't understand a word... Ima noob. Could you give me code and tell me where to put it? thanx.
  2. Heres an image of what i mean if it works or not is another thing.... but hey! Thanks for your help!
  3. Thank you so much but one more problem.... the block. When you hold a furnace on the right hand side of the icon is the front and on the left side is the side icon. How can i make the icon of my item like that. both the left and right side is the icon for the side.
  4. like you know when you place a furnace it faces you? I want that... This doesn't do that
  5. Ok cool thanks I've copied the code, it all works smoothly, except for one thing, the furnace faces always a set direction; it never changes. I checked the furnace code and well i have been unsuccessful... ------------------------------------------------------------------------------------------------------------------------------- @SideOnly(Side.CLIENT) private Icon furnaceIconTop; @SideOnly(Side.CLIENT) private Icon furnaceIconFront; /** * Called whenever the block is added into the world. Args: world, x, y, z */ public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); this.setDefaultDirection(par1World, par2, par3, par4); } /** * set a blocks direction */ private void setDefaultDirection(World par1World, int par2, int par3, int par4) { if (!par1World.isRemote) { int l = par1World.getBlockId(par2, par3, par4 - 1); int i1 = par1World.getBlockId(par2, par3, par4 + 1); int j1 = par1World.getBlockId(par2 - 1, par3, par4); int k1 = par1World.getBlockId(par2 + 1, par3, par4); byte b0 = 3; if (Block.opaqueCubeLookup[l] && !Block.opaqueCubeLookup[i1]) { b0 = 3; } if (Block.opaqueCubeLookup[i1] && !Block.opaqueCubeLookup[l]) { b0 = 2; } if (Block.opaqueCubeLookup[j1] && !Block.opaqueCubeLookup[k1]) { b0 = 5; } if (Block.opaqueCubeLookup[k1] && !Block.opaqueCubeLookup[j1]) { b0 = 4; } par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); } } @SideOnly(Side.CLIENT) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { return par1 == 1 ? this.furnaceIconTop : (par1 == 0 ? this.furnaceIconTop : (par1 != par2 ? this.blockIcon : this.furnaceIconFront)); } @SideOnly(Side.CLIENT) /** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("furnace_side"); this.furnaceIconFront = par1IconRegister.registerIcon("furnace_front_off"); this.furnaceIconTop = par1IconRegister.registerIcon("furnace_top"); } ---------------------------------------------------------------------------------------------------------- If i could get some help that would be awesome! For some reason the code thing isn't working....
  6. I wanted to make a block similar that looks similar to a furnace. I need it to change the front face based on where you are looking, like a furnace. If someone could post up code it would be [glow=yellow,2,300]awesome[/glow]!
×
×
  • Create New...

Important Information

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