mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 04:09:51 +00:00
59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
--- ../src_base/minecraft/net/minecraft/block/BlockVine.java
|
|
+++ ../src_work/minecraft/net/minecraft/block/BlockVine.java
|
|
@@ -2,6 +2,8 @@
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
+
|
|
+import java.util.ArrayList;
|
|
import java.util.Random;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.creativetab.CreativeTabs;
|
|
@@ -15,7 +17,9 @@
|
|
import net.minecraft.world.IBlockAccess;
|
|
import net.minecraft.world.World;
|
|
|
|
-public class BlockVine extends Block
|
|
+import net.minecraftforge.common.IShearable;
|
|
+
|
|
+public class BlockVine extends Block implements IShearable
|
|
{
|
|
public BlockVine(int par1)
|
|
{
|
|
@@ -436,14 +440,26 @@
|
|
*/
|
|
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
|
|
{
|
|
- if (!par1World.isRemote && par2EntityPlayer.getCurrentEquippedItem() != null && par2EntityPlayer.getCurrentEquippedItem().itemID == Item.shears.shiftedIndex)
|
|
- {
|
|
- par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
|
|
- this.dropBlockAsItem_do(par1World, par3, par4, par5, new ItemStack(Block.vine, 1, 0));
|
|
- }
|
|
- else
|
|
- {
|
|
- super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
|
|
- }
|
|
+ super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isShearable(ItemStack item, World world, int x, int y, int z)
|
|
+ {
|
|
+ return true;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune)
|
|
+ {
|
|
+ ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
|
|
+ ret.add(new ItemStack(this, 1, 0));
|
|
+ return ret;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public boolean isLadder(World world, int x, int y, int z)
|
|
+ {
|
|
+ return true;
|
|
}
|
|
}
|