MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / harvestBlock

Method harvestBlock

src/main/java/net/minecraft/block/BlockVine.java:416–427  ·  view source on GitHub ↗
(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)

Source from the content-addressed store, hash-verified

414 }
415
416 public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
417 {
418 if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
419 {
420 player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
421 spawnAsEntity(worldIn, pos, new ItemStack(Blocks.vine, 1, 0));
422 }
423 else
424 {
425 super.harvestBlock(worldIn, player, pos, state, te);
426 }
427 }
428
429 public EnumWorldBlockLayer getBlockLayer()
430 {

Callers

nothing calls this directly

Calls 5

getIdFromBlockMethod · 0.95
triggerAchievementMethod · 0.80
spawnAsEntityMethod · 0.80
getItemMethod · 0.45

Tested by

no test coverage detected