Called when the player finishes using this Item (E.g. finishes eating.). Not called when the player stops using the Item before the action is complete.
(ItemStack stack, World worldIn, EntityPlayer playerIn)
| 56 | * the Item before the action is complete. |
| 57 | */ |
| 58 | public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityPlayer playerIn) |
| 59 | { |
| 60 | --stack.stackSize; |
| 61 | playerIn.getFoodStats().addStats(this, stack); |
| 62 | worldIn.playSoundAtEntity(playerIn, "random.burp", 0.5F, worldIn.rand.nextFloat() * 0.1F + 0.9F); |
| 63 | this.onFoodEaten(stack, worldIn, playerIn); |
| 64 | playerIn.triggerAchievement(StatList.objectUseStats[Item.getIdFromItem(this)]); |
| 65 | return stack; |
| 66 | } |
| 67 | |
| 68 | protected void onFoodEaten(ItemStack stack, World worldIn, EntityPlayer player) |
| 69 | { |
nothing calls this directly
no test coverage detected