Skip to content

Commit

Permalink
Fix dig speed on redstone ore and obsidian.
Browse files Browse the repository at this point in the history
  • Loading branch information
LexManos committed Dec 25, 2013
1 parent 40d02fe commit a6827f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion patches/minecraft/net/minecraft/block/Block.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
}

protected ItemStack func_149644_j(int p_149644_1_)
@@ -1114,6 +1147,1062 @@
@@ -1114,6 +1147,1065 @@
return null;
}

Expand Down Expand Up @@ -1189,6 +1189,7 @@
+ setHarvestLevel(toolClass, level, m);
+ }
+ }
+
+ /**
+ * Sets or removes the tool and level required to harvest this block.
+ *
Expand Down Expand Up @@ -1241,6 +1242,8 @@
+ */
+ public boolean isToolEffective(String type, int metadata)
+ {
+ if ("pickaxe".equals(type) && (this == Blocks.redstone_ore || this == Blocks.lit_redstone_ore || this == Blocks.obsidian))
+ return false;
+ if (harvestTool[metadata] == null) return true;
+ return harvestTool[metadata].equals(type);
+ }
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/net/minecraftforge/common/ForgeHooks.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,6 @@ static void initTools()
Blocks.iron_block.setHarvestLevel("pickaxe", 1);
Blocks.lapis_ore.setHarvestLevel("pickaxe", 1);
Blocks.lapis_block.setHarvestLevel("pickaxe", 1);
//MinecraftForge.removeBlockEffectiveness(Blocks.redstone_ore, "pickaxe");
//MinecraftForge.removeBlockEffectiveness(Blocks.obsidian, "pickaxe");
//MinecraftForge.removeBlockEffectiveness(Blocks.lit_redstone_ore, "pickaxe");
}

public static int getTotalArmorValue(EntityPlayer player)
Expand Down

0 comments on commit a6827f9

Please sign in to comment.