Jump to content

[1.6.4] Ore not dropping XP?


Recommended Posts

Can anyone point out why my ore Isn't dropping any XP? I'm clueless


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 xp = 0;

        xp = MathHelper.getRandomIntegerInRange(world.rand, 2, 75);


        this.dropXpOnBlockBreak(world, par2, par3, par4, xp);

Link to comment
Share on other sites

Haven't tried this but shouldn't it be == instead of != in your if statement.


It depends on whether or not the id that is being dropped is his ore or not. Usually if it is the ore then the block won't drop experience and will instead drop experience during smelting. He probably has another item being dropped besides his ore, so it would then make sense to drop experience since you wouldn't be smelting the item at all.

If you really want help, give that modder a thank you.


Modders LOVE thank yous.

Link to comment
Share on other sites

Well, what you are basically telling it to do is:


If the block I mined is not (the block I want's ID), then drop XP.

You are basically CANCELLING the whole process because the if statement can't send you to the things you want it to do, since it doesn't match.


Like Jdb100 said, try replacing != with ==, unless you are doing something extremely different then how we are seeing it.

Link to comment
Share on other sites

This topic is now closed to further replies.

  • Create New...

Important Information

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