Fixed dimension option

This commit is contained in:
GotoLink 2015-01-04 18:19:25 +01:00
commit 521cc695c4
2 changed files with 10 additions and 9 deletions

View file

@ -57,7 +57,7 @@
<orderEntry type="library" name="Gradle: twitch-platform-5.16-natives-windows-32" level="project" /> <orderEntry type="library" name="Gradle: twitch-platform-5.16-natives-windows-32" level="project" />
<orderEntry type="library" name="Gradle: twitch-platform-5.16-natives-windows-64" level="project" /> <orderEntry type="library" name="Gradle: twitch-platform-5.16-natives-windows-64" level="project" />
<orderEntry type="library" name="Gradle: vecmath-1.3.1" level="project" /> <orderEntry type="library" name="Gradle: vecmath-1.3.1" level="project" />
<orderEntry type="library" exported="" name="Gradle: forgeSrc-1.7.10-10.13.2.1230" level="project" /> <orderEntry type="library" exported="" name="Gradle: :forgeSrc:1.7.10-10.13.2.1230" level="project" />
<orderEntry type="library" exported="" name="Gradle: D__Modding_Caches__gradle_caches_minecraft_net_minecraftforge_forge_1_7_10_10_13_2_1230_start" level="project" />
</component> </component>
</module> </module>

View file

@ -87,13 +87,13 @@ public class Config {
} catch (IllegalArgumentException l) { } catch (IllegalArgumentException l) {
} }
} }
} else if (i < 1 && txt.contains("[") && txt.contains("]")) { } else if (i < 2 && txt.contains("[") && txt.contains("]")) {
boolean remove = txt.trim().startsWith("-"); boolean remove = txt.trim().startsWith("-");
txt = txt.substring(txt.indexOf("["), txt.indexOf("]")); String[] results = txt.substring(txt.indexOf("[")+1, txt.indexOf("]")).split(";");
if (txt.split(";").length == 2) { if (results.length == 2) {
try { try {
int a = Integer.parseInt(txt.split(";")[0]); int a = Integer.parseInt(results[0]);
int b = Integer.parseInt(txt.split(";")[1]); int b = Integer.parseInt(results[1]);
int c; int c;
if (a > b) { if (a > b) {
c = a; c = a;
@ -141,6 +141,7 @@ public class Config {
} }
} }
} }
if(config.hasChanged())
config.save(); config.save();
} }