(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
| 1007 | } |
| 1008 | |
| 1009 | public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te) |
| 1010 | { |
| 1011 | player.triggerAchievement(StatList.mineBlockStatArray[getIdFromBlock(this)]); |
| 1012 | player.addExhaustion(0.025F); |
| 1013 | |
| 1014 | if (this.canSilkHarvest() && EnchantmentHelper.getSilkTouchModifier(player)) |
| 1015 | { |
| 1016 | ItemStack itemstack = this.createStackedBlock(state); |
| 1017 | |
| 1018 | if (itemstack != null) |
| 1019 | { |
| 1020 | spawnAsEntity(worldIn, pos, itemstack); |
| 1021 | } |
| 1022 | } |
| 1023 | else |
| 1024 | { |
| 1025 | int i = EnchantmentHelper.getFortuneModifier(player); |
| 1026 | this.dropBlockAsItem(worldIn, pos, state, i); |
| 1027 | } |
| 1028 | } |
| 1029 | |
| 1030 | protected boolean canSilkHarvest() |
| 1031 | { |
no test coverage detected