Jump to content

Which function to override for block drops?


Recommended Posts

I was looking through the Forge Javadoc, and found




dropBlockAsItem (again with different sig)





quantityDropped (again with different sig)



I'm assuming I should be overriding getDrops, but I'm wondering what all the others are for.


Also, why are there so many functions that don't say what they do and have parameters with names like p_164584_2? It only seems to make finding stuff I'm _supposed_ to be using unnecessarily confusing.  ???

This may be a dumb question. Feel free to say it is.

Link to comment
Share on other sites

I'm pretty suree it's this:

protected void dropBlockAsItem(World p_149642_1_, int p_149642_2_, int p_149642_3_, int p_149642_4_, ItemStack p_149642_5_)

It has a World, x, y, z, Itemstack. For help about that look at the Block class. ;)



I'm sure that if you Override getItemDropped(int, Random, int) it will work but I'm not sure what are the parameters there.


If I helped then you help, hit that Thank You button or Applaud.

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.

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.