mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Update CommandIrisStructureCreate.java
Fix even number entering
This commit is contained in:
parent
5241182520
commit
d8cb9f2c03
@ -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);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user