Biomes O' Plenty

Biomes O' Plenty

151M Downloads

[1.6.4] When eating salads, multiple bowls are returned as well an empty bottle

wwrpg opened this issue ยท 4 comments

commented

When eating a fruit salad, veggie salad, or mushroom salad always get multiple bowls back as well as an empty potion bottle.

Fix:
Looks like there are missing breaks in the switch statement in the ItemBOPFood.java onEaten method. Need to add break lines as seen below:

    switch (itemstack.getItemDamage())
    {
        case 4:
            if (!player.inventory.addItemStackToInventory(new ItemStack(Item.bowlEmpty)))
                player.dropPlayerItem(new ItemStack(Item.bowlEmpty.itemID, 1, 0));
                break;
        case 5:
            if (!player.inventory.addItemStackToInventory(new ItemStack(Item.bowlEmpty)))
                player.dropPlayerItem(new ItemStack(Item.bowlEmpty.itemID, 1, 0));
                break;
        case 6:
            if (!player.inventory.addItemStackToInventory(new ItemStack(Item.bowlEmpty)))
                player.dropPlayerItem(new ItemStack(Item.bowlEmpty.itemID, 1, 0));
                break;              
        case 10:
            if (!player.inventory.addItemStackToInventory(new ItemStack(Item.glassBottle)))
                player.dropPlayerItem(new ItemStack(Item.glassBottle.itemID, 1, 0));
            break;
    }
commented

While i appreciate the suggestions, it leads me to question as to why you didn't just simply submit a pull request when you know how to fix it, and even have the necessary code changes...

commented

Fixed via #191

commented

Well, we're not making 1.6.4 builds any more - we're concentrating on 1.7, but I can see the same bug there, so thanks anyway ;)

commented

Sorry, I'm new to github. I knew the fix, just didn't know how to get the changes in.
I'll try the pull request thingy.

Also didn't know if you were still making 1.6.4 builds.