Posted March 21, 201312 yr OK, What im trying to do is make a universal block file so that im not makeing a thousand BlockNAMEOFBLOCK files. While trying to do this however i had to make the file very flexible... i dont have the code with me so this is the basic gist of what it looks like. public BlockIB extends Block{ public static int iD; public static int qD; public BlockIB(int id, int picId, Material material, int quantDrop, int idDrop){ super(id, picId, material); if(idDrop != 0) { iD = idDrop; }else{ iD = this.blockID; } qD = quantDrop; } public int idDropped(Random rand){ return iD; } public int quantityDropped(Random rand){ return qD; } @Override public String getTextureFile(){ return CommonProxy.BLOCK_PNG; } } If you see some stupid error, its either my problem or a problem i had copying this down. i have horrible memory...
March 21, 201312 yr Author why not just make a block with meta data? I admit im not that good with JAVA but i thought i had enough knowladge of it before i started this... What's metadata? well... i know what it is I just dont really know what you mean by adding metadata... Also, this code worked before, the only reason that im remaking it is cause i lost the previous project... so i have no idea why this isnt working.
March 21, 201312 yr http://www.minecraftforum.net/topic/1452051-15-wip-again-deverions-forge-modding-tutorials-updated-16-03-2013-15-tutorials-1/ subsection: Creating blocks with metadata
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.