Jump to content

Help with ID Dropped... Its not working and i have no idea why...


Vemahk20

Recommended Posts

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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

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