mirror of
https://github.com/barkeser2002/CatServer.git
synced 2026-09-25 01:39:52 +03:00
21 lines
851 B
Diff
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()));
|
|
+ }
|
|
}
|