mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 14:34:28 +00:00
25 lines
1.1 KiB
Diff
25 lines
1.1 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockNewLeaf.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockNewLeaf.java
|
|
@@ -99,14 +99,15 @@
|
|
|
|
public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te)
|
|
{
|
|
- if (!worldIn.isRemote && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() == Items.shears)
|
|
{
|
|
- player.triggerAchievement(StatList.mineBlockStatArray[Block.getIdFromBlock(this)]);
|
|
- spawnAsEntity(worldIn, pos, new ItemStack(Item.getItemFromBlock(this), 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata() - 4));
|
|
- }
|
|
- else
|
|
- {
|
|
super.harvestBlock(worldIn, player, pos, state, te);
|
|
}
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
|
+ {
|
|
+ IBlockState state = world.getBlockState(pos);
|
|
+ return new java.util.ArrayList(java.util.Arrays.asList(new ItemStack(this, 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata() - 4)));
|
|
+ }
|
|
}
|