From 575b5482b69f757f7aebe21e32120b7bb9464b20 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Fri, 23 Oct 2020 00:30:06 +0200 Subject: [PATCH] Update CommandIrisStructureCreate.java Fix creator arguments (I'm stoopid) --- .../command/CommandIrisStructureCreate.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/volmit/iris/command/CommandIrisStructureCreate.java b/src/main/java/com/volmit/iris/command/CommandIrisStructureCreate.java index 6cd2fcd97..5e1840e8a 100644 --- a/src/main/java/com/volmit/iris/command/CommandIrisStructureCreate.java +++ b/src/main/java/com/volmit/iris/command/CommandIrisStructureCreate.java @@ -48,13 +48,22 @@ public class CommandIrisStructureCreate extends MortarCommand width = 5; height = 5; } else if (args.length == 3){ - sender.sendMessage("No height specified, taking width as height"); - width = Integer.parseInt(args[2]); - height = Integer.parseInt(args[2]); + if (args[2].equalsIgnoreCase("-3d")) + { + sender.sendMessage("No width and height specified. Taking defaults (5 and 5)"); + width = 5; + height = 5; + d3 = true; + } else { + sender.sendMessage("No height specified, taking width as height"); + width = Integer.parseInt(args[2]); + height = Integer.parseInt(args[2]); + } } else if (args.length == 4){ width = Integer.parseInt(args[2]); - if (!args[3].equalsIgnoreCase("-3d")) { + if (args[3].equalsIgnoreCase("-3d")) + { sender.sendMessage("No height specified, taking width as height"); height = Integer.parseInt(args[2]); } else {