Tweaked a few switch statements.

This commit is contained in:
GJ 2012-07-02 21:05:55 -04:00
parent bc58aff362
commit 8257fd8e7c
3 changed files with 13 additions and 13 deletions

View File

@ -399,7 +399,7 @@ public class Mining {
}
default:
break;
return;
}
}
}

View File

@ -71,6 +71,10 @@ public class BlockChecks {
* @return true if the block should allow ability activation, false otherwise
*/
public static boolean abilityBlockCheck(Block block) {
if (customBlocksEnabled && CustomBlocksConfig.getInstance().customAbilityBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
return false;
}
switch (block.getType()) {
case BED_BLOCK:
case BREWING_STAND:
@ -94,17 +98,12 @@ public class BlockChecks {
return false;
default:
break;
}
if (block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
return false;
}
else if (customBlocksEnabled && CustomBlocksConfig.getInstance().customAbilityBlocks.contains(new ItemStack(block.getTypeId(), 1, (short) 0, block.getData()))) {
return false;
}
else {
return true;
if (block.getTypeId() == Config.getInstance().getRepairAnvilId()) {
return false;
}
else {
return true;
}
}
}

View File

@ -148,6 +148,7 @@ public class Combat {
}
break;
case WOLF:
Wolf wolf = (Wolf) damager;
@ -173,6 +174,7 @@ public class Combat {
}
break;
case ARROW:
LivingEntity shooter = ((Arrow) damager).getShooter();
@ -190,7 +192,6 @@ public class Combat {
}
archeryCheck((Player) shooter, target, event);
break;
default: