mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-06-18 14:50:57 +00:00
Update CommandIrisStructureCreate.java
Fix even number entering
This commit is contained in:
@@ -69,6 +69,12 @@ public class CommandIrisStructureCreate extends MortarCommand
|
|||||||
height = Integer.parseInt(args[3]);
|
height = Integer.parseInt(args[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (width % 2 == 0 || height % 2 == 0){
|
||||||
|
sender.sendMessage("Width and/or height is an even number. Adding one");
|
||||||
|
width += width % 2 == 0 ? 1 : 0;
|
||||||
|
height += height % 2 == 0 ? 1 : 0;
|
||||||
|
}
|
||||||
|
|
||||||
sender.sendMessage("Creating new Structure");
|
sender.sendMessage("Creating new Structure");
|
||||||
new StructureTemplate(args[0], args[1], p, p.getLocation(), 5, width, height, d3);
|
new StructureTemplate(args[0], args[1], p, p.getLocation(), 5, width, height, d3);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user