Posted February 28, 201312 yr 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); }
February 28, 201312 yr 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.
February 28, 201312 yr Author Hmm, so thats what the par1 == 7 is about, the metadata! oh, so at its last instance before it breaks it decieds if it drops a ore or a gem? And love the Star Trek Skin.
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.