From acd9bcceeba16fac47f19a2bcf47a074fd246a46 Mon Sep 17 00:00:00 2001 From: aUniqueUser Date: Tue, 25 Feb 2020 21:47:35 -0500 Subject: [PATCH] Codacy --- src/main/java/baritone/command/defaults/TunnelCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/baritone/command/defaults/TunnelCommand.java b/src/main/java/baritone/command/defaults/TunnelCommand.java index 2831675b..3972a325 100644 --- a/src/main/java/baritone/command/defaults/TunnelCommand.java +++ b/src/main/java/baritone/command/defaults/TunnelCommand.java @@ -51,7 +51,8 @@ public class TunnelCommand extends Command { } if (cont) { - BlockPos corner1 = null, corner2 = null; + BlockPos corner1; + BlockPos corner2; EnumFacing enumfacing = ctx.player().getHorizontalFacing(); int addition = ((width % 2 == 0) ? 0 : 1); switch (enumfacing) { @@ -71,6 +72,8 @@ public class TunnelCommand extends Command { corner1 = new BlockPos(ctx.playerFeet().x + width / 2 + addition, ctx.playerFeet().y, ctx.playerFeet().z); corner2 = new BlockPos(ctx.playerFeet().x - width / 2, ctx.playerFeet().y + height, ctx.playerFeet().z + depth); break; + default: + throw new IllegalStateException("Unexpected value: " + enumfacing); } baritone.getBuilderProcess().clearArea(corner1, corner2); }