So many useless else statements...

This commit is contained in:
gmcferrin
2013-01-09 22:43:21 -05:00
parent 75a5ffcb10
commit 8b9432d1d9
33 changed files with 358 additions and 407 deletions

View File

@ -69,47 +69,45 @@ public class SuperBreakerEventHandler {
if (ModChecks.getCustomBlock(block).getTier() < tier) {
return false;
}
else {
return true;
}
return true;
}
else {
switch (blockType) {
case OBSIDIAN:
if (tier < Mining.DIAMOND_TOOL_TIER) {
return false;
}
/* FALL THROUGH */
case DIAMOND_ORE:
case GLOWING_REDSTONE_ORE:
case GOLD_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
case EMERALD_ORE:
if (tier < Mining.IRON_TOOL_TIER) {
return false;
}
/* FALL THROUGH */
case IRON_ORE:
if (tier < Mining.STONE_TOOL_TIER) {
return false;
}
/* FALL THROUGH */
case COAL_ORE:
case ENDER_STONE:
case GLOWSTONE:
case MOSSY_COBBLESTONE:
case NETHERRACK:
case SANDSTONE:
case STONE:
return true;
default:
switch (blockType) {
case OBSIDIAN:
if (tier < Mining.DIAMOND_TOOL_TIER) {
return false;
}
/* FALL THROUGH */
case DIAMOND_ORE:
case GLOWING_REDSTONE_ORE:
case GOLD_ORE:
case LAPIS_ORE:
case REDSTONE_ORE:
case EMERALD_ORE:
if (tier < Mining.IRON_TOOL_TIER) {
return false;
}
/* FALL THROUGH */
case IRON_ORE:
if (tier < Mining.STONE_TOOL_TIER) {
return false;
}
/* FALL THROUGH */
case COAL_ORE:
case ENDER_STONE:
case GLOWSTONE:
case MOSSY_COBBLESTONE:
case NETHERRACK:
case SANDSTONE:
case STONE:
return true;
default:
return false;
}
}