From 864f67ef3727d2dcd28d46c1d53a7865386938b9 Mon Sep 17 00:00:00 2001 From: Benford Whitaker Date: Sun, 23 Jun 2019 19:55:58 -0400 Subject: [PATCH] earthtunnel again (#991) ## Misc. Changes * change isOre in earthtunnel back to a switch statement but properly implemented --- .../earthbending/EarthTunnel.java | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/src/com/projectkorra/projectkorra/earthbending/EarthTunnel.java b/src/com/projectkorra/projectkorra/earthbending/EarthTunnel.java index f585a572..29319ec5 100644 --- a/src/com/projectkorra/projectkorra/earthbending/EarthTunnel.java +++ b/src/com/projectkorra/projectkorra/earthbending/EarthTunnel.java @@ -160,25 +160,19 @@ public class EarthTunnel extends EarthAbility { } private boolean isOre(final Block block) { - if (block.getType() == Material.IRON_ORE) { - return true; - } else if (block.getType() == Material.GOLD_ORE) { - return true; - } else if (block.getType() == Material.DIAMOND_ORE) { - return true; - } else if (block.getType() == Material.REDSTONE_ORE) { - return true; - } else if (block.getType() == Material.COAL_ORE) { - return true; - } else if (block.getType() == Material.EMERALD_ORE) { - return true; - } else if (block.getType() == Material.LAPIS_ORE) { - return true; - } else if (block.getType() == Material.NETHER_QUARTZ_ORE) { - return true; + switch (block.getType()) { + case COAL_ORE: + case IRON_ORE: + case GOLD_ORE: + case LAPIS_ORE: + case REDSTONE_ORE: + case DIAMOND_ORE: + case EMERALD_ORE: + case NETHER_QUARTZ_ORE: + return true; + default: + return false; } - - return false; } @Override