Created an ItemStack sensitive version of canHarvestBlock.
This commit is contained in:
parent
e19ec10b7f
commit
c5b64c5eef
2 changed files with 21 additions and 1 deletions
|
@ -60,7 +60,7 @@
|
||||||
Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3);
|
Vec3 vec31 = vec3.addVector((double)f7 * d3, (double)f6 * d3, (double)f8 * d3);
|
||||||
return par1World.rayTraceBlocks_do_do(vec3, vec31, par3, !par3);
|
return par1World.rayTraceBlocks_do_do(vec3, vec31, par3, !par3);
|
||||||
}
|
}
|
||||||
@@ -720,4 +736,497 @@
|
@@ -720,4 +736,508 @@
|
||||||
{
|
{
|
||||||
StatList.initStats();
|
StatList.initStats();
|
||||||
}
|
}
|
||||||
|
@ -556,5 +556,16 @@
|
||||||
+ {
|
+ {
|
||||||
+ stack.itemDamage = 0;
|
+ stack.itemDamage = 0;
|
||||||
+ }
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * ItemStack sensitive version of {@link #canHarvestBlock(Block)}
|
||||||
|
+ * @param par1Block The block trying to harvest
|
||||||
|
+ * @param itemStack The itemstack used to harvest the block
|
||||||
|
+ * @return true if can harvest the block
|
||||||
|
+ */
|
||||||
|
+ public boolean canHarvestBlock(Block par1Block, ItemStack itemStack)
|
||||||
|
+ {
|
||||||
|
+ return canHarvestBlock(par1Block);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,3 +59,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -396,7 +391,7 @@
|
||||||
|
*/
|
||||||
|
public boolean canHarvestBlock(Block par1Block)
|
||||||
|
{
|
||||||
|
- return Item.itemsList[this.itemID].canHarvestBlock(par1Block);
|
||||||
|
+ return Item.itemsList[this.itemID].canHarvestBlock(par1Block, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean interactWith(EntityLiving par1EntityLiving)
|
||||||
|
|
Loading…
Reference in a new issue