(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player)
| 84 | } |
| 85 | |
| 86 | private void eatCake(World worldIn, BlockPos pos, IBlockState state, EntityPlayer player) |
| 87 | { |
| 88 | if (player.canEat(false)) |
| 89 | { |
| 90 | player.triggerAchievement(StatList.field_181724_H); |
| 91 | player.getFoodStats().addStats(2, 0.1F); |
| 92 | int i = state.getValue(BITES); |
| 93 | |
| 94 | if (i < 6) |
| 95 | { |
| 96 | worldIn.setBlockState(pos, state.withProperty(BITES, i + 1), 3); |
| 97 | } |
| 98 | else |
| 99 | { |
| 100 | worldIn.setBlockToAir(pos); |
| 101 | } |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | public boolean canPlaceBlockAt(World worldIn, BlockPos pos) |
| 106 | { |
no test coverage detected