From a6ef09ee0240bfa1d3fc6a495b5aebc25f890304 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Thu, 11 Jul 2013 19:24:04 -0400 Subject: [PATCH] Made salads give the bowl back when eaten. --- src/minecraft/biomesoplenty/items/ItemBOPFood.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/minecraft/biomesoplenty/items/ItemBOPFood.java b/src/minecraft/biomesoplenty/items/ItemBOPFood.java index 747bbf0ce..c7b33e68e 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPFood.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPFood.java @@ -5,6 +5,7 @@ import java.util.List; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; @@ -93,6 +94,18 @@ public class ItemBOPFood extends ItemFood player.getFoodStats().setFoodSaturationLevel(player.getFoodStats().getSaturationLevel() + saturation); world.playSoundAtEntity(player, "random.burp", 0.5F, world.rand.nextFloat() * 0.1F + 0.9F); this.onFoodEaten(itemstack, world, player); + if (itemstack.getItemDamage() == 4) + { + return new ItemStack(Item.bowlEmpty); + } + if (itemstack.getItemDamage() == 5) + { + return new ItemStack(Item.bowlEmpty); + } + if (itemstack.getItemDamage() == 6) + { + return new ItemStack(Item.bowlEmpty); + } return itemstack; }