Posted January 6, 201411 yr Hello. So I've recently begun my second mod which I've named Jake's Gems which adds gems very similar to the ones in RedPower2. Yes, I'm aware this idea is not very original, but I wanted to make it both as a learning experience and something to complement a custom modpack of mine. Anyway the problem I'm having is just like the title says. My custom ore is unaffected by being broken with a Fortune Pickaxe. Here is the code in my RubiteOre class: package jakegems; import java.util.Random; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class RubiteOre extends Block { public RubiteOre(int id, Material material) { super (id, material); setHardness(1.5f); setStepSound(Block.soundStoneFootstep); setUnlocalizedName("newBlock"); setCreativeTab(CreativeTabs.tabMisc); } public int idDropped (int metadata, Random random, int fortune) { return JakeGems.gemRubite.itemID; } public void dropBlockAsItemWithChance (World world, int par2, int par3, int par4, int par5, float par6, int par7) { super.dropBlockAsItemWithChance(world, par2, par3, par4, par5, par6, par7); if (this.idDropped(par5, world.rand, par7) != this.blockID) { int xporbs = 0; xporbs = MathHelper.getRandomIntegerInRange(world.rand, 0, 12); this.dropXpOnBlockBreak(world, par2, par3, par4, xporbs); } } } Any and all help received is greatly appreciated, thank you! Laterz, ~Jake
February 6, 201411 yr Hey what was the fix for this? I can't seem to find another posting like this and I am having the same problem.
February 6, 201411 yr I believe this is the method you're looking for: public int quantityDropped(int meta, int fortune, Random random) { return quantityDroppedWithBonus(fortune, random); } If you really want help, give that modder a thank you. Modders LOVE thank yous.
February 7, 201411 yr Thank you I ended up finding it in the Redstone ore class but now others will have the answer too when they are searching for this!
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.