Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Multiple Items


mrkarp
 Share

Recommended Posts

Hello, I am stuck on having an ore that is generated in the world drop and item, and another item.

 

Ive looked at the crops block to see how wheat did that with seeds and wheat, but I cannot figure it out.

 

    protected int getGemItem()
    {
        return KarbideCore.tungstenite.itemID;
    }

    protected int getOreItem()
    {
        return KarbideCore.karbide.itemID;
    }

    public int idDropped(int par1, Random par2Random, int par3)
    {
        return par1 == 7 ? this.getOreItem() : this.getGemItem();
    }

public int quantityDropped(int meta, int fortune, Random random){
	return 1 + random.nextInt(2);
}

Link to comment
Share on other sites

the code you provided looks ok - it should drop either ore when block's meta is 7 or gem otherwise. you want dropping two different items from your block? if so you'll probably have to override Block.getBlockDropped method and fill the return list with your items (ItemStack(s) containing your item(s)).

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.