Files
2019-02-24 22:29:41 +08:00

21 lines
851 B
Diff

--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
@@ -101,11 +101,16 @@
if (!worldIn.isRemote && stack.getItem() == Items.SHEARS)
{
player.addStat(StatList.getBlockStats(this));
- spawnAsEntity(worldIn, pos, new ItemStack(Item.getItemFromBlock(this), 1, ((BlockPlanks.EnumType)state.getValue(VARIANT)).getMetadata()));
}
else
{
super.harvestBlock(worldIn, player, pos, state, te, stack);
}
}
+
+ @Override
+ public NonNullList<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
+ {
+ return NonNullList.withSize(1, new ItemStack(this, 1, world.getBlockState(pos).getValue(VARIANT).getMetadata()));
+ }
}