mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 14:34:28 +00:00
to be refactored not to have imports. Progress: https://gist.github.com/cpw/29695e426e2b122cf8ff
34 lines
1.4 KiB
Diff
34 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockDeadBush.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockDeadBush.java
|
|
@@ -14,7 +14,7 @@
|
|
import net.minecraft.util.BlockPos;
|
|
import net.minecraft.world.World;
|
|
|
|
-public class BlockDeadBush extends BlockBush
|
|
+public class BlockDeadBush extends BlockBush implements net.minecraftforge.common.IShearable
|
|
{
|
|
private static final String __OBFID = "CL_00000224";
|
|
|
|
@@ -47,14 +47,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(Blocks.deadbush, 1, 0));
|
|
- }
|
|
- else
|
|
- {
|
|
super.harvestBlock(worldIn, player, pos, state, te);
|
|
}
|
|
}
|
|
+
|
|
+ @Override public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos){ return true; }
|
|
+ @Override
|
|
+ public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune)
|
|
+ {
|
|
+ return new java.util.ArrayList<ItemStack>(java.util.Arrays.asList(new ItemStack(Blocks.deadbush)));
|
|
+ }
|
|
}
|