2011-10-10 23:47:30 +00:00
|
|
|
--- ../src_base/minecraft_server/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
|
|
|
+++ ../src_work/minecraft_server/net/minecraft/src/Item.java 0000-00-00 00:00:00.000000000 -0000
|
2011-11-30 19:00:43 +00:00
|
|
|
@@ -175,6 +175,9 @@
|
|
|
|
private String field_39006_bR;
|
|
|
|
private String itemName;
|
|
|
|
|
|
|
|
+ // FORGE: To disable repair recipes.
|
|
|
|
+ protected boolean canRepair=true;
|
|
|
|
+
|
|
|
|
protected Item(int i)
|
|
|
|
{
|
|
|
|
maxStackSize = 64;
|
|
|
|
@@ -219,6 +222,13 @@
|
2011-10-09 04:21:29 +00:00
|
|
|
return 1.0F;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /* FORGE: Metadata-sensitive version of getStrVsBlock
|
|
|
|
+ */
|
|
|
|
+ public float getStrVsBlock(ItemStack itemstack, Block block, int md)
|
|
|
|
+ {
|
|
|
|
+ return getStrVsBlock(itemstack,block);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer entityplayer)
|
|
|
|
{
|
|
|
|
return itemstack;
|
2011-12-02 04:08:15 +00:00
|
|
|
@@ -266,6 +276,29 @@
|
2011-11-30 19:00:43 +00:00
|
|
|
return maxDamage > 0 && !hasSubtypes;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ /* FORGE: Called by CraftingManager to determine if an item is repairable.
|
|
|
|
+ */
|
|
|
|
+ public boolean isRepairable() {
|
|
|
|
+ return canRepair && isDamageable();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /* FORGE: Call to disable repair recipes.
|
|
|
|
+ */
|
|
|
|
+ public Item setNoRepair() {
|
|
|
|
+ canRepair=false;
|
|
|
|
+ return this;
|
|
|
|
+ }
|
2011-12-02 04:08:15 +00:00
|
|
|
+
|
|
|
|
+ /* FORGE: Called before a block is broken. Return true to prevent default
|
|
|
|
+ * block harvesting.
|
|
|
|
+ *
|
|
|
|
+ * Note: In SMP, this is called on both client and server sides!
|
|
|
|
+ */
|
|
|
|
+ public boolean onBlockStartBreak(ItemStack itemstack, int i, int j, int k,
|
|
|
|
+ EntityPlayer player) {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
2011-11-30 19:00:43 +00:00
|
|
|
+
|
|
|
|
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
|
|
|
|
{
|
|
|
|
return false;
|