Performance pass 2 (Loop can be terminated after condition is met)

This commit is contained in:
Andrew 2020-10-15 22:43:05 -07:00
parent f8f8b884bc
commit 1087d27523
6 changed files with 22 additions and 22 deletions

View File

@ -36,9 +36,9 @@ public class CommandIrisDownload extends MortarCommand
for(String i : args) for(String i : args)
{ {
if(i.equals("-t") || i.equals("--trim")) if (i.equals("-t") || i.equals("--trim")) {
{
trim = true; trim = true;
break;
} }
} }

View File

@ -48,10 +48,10 @@ public class CommandIrisObjectPaste extends MortarCommand
for(String i : args) for(String i : args)
{ {
if(i.equalsIgnoreCase("-edit")) if (i.equalsIgnoreCase("-edit")) {
{ intoWand = true;
intoWand = true; break;
} }
} }
if(file == null || !file.exists()) if(file == null || !file.exists())

View File

@ -51,10 +51,10 @@ public class CommandIrisObjectSave extends MortarCommand
for(String i : args) for(String i : args)
{ {
if(i.equals("-o")) if (i.equals("-o")) {
{ overwrite = true;
overwrite = true; break;
} }
} }
Player p = sender.player(); Player p = sender.player();

View File

@ -39,10 +39,10 @@ public class CommandIrisStructureCreate extends MortarCommand
for(String i : args) for(String i : args)
{ {
if(i.equalsIgnoreCase("-3d")) if (i.equalsIgnoreCase("-3d")) {
{ d3 = true;
d3 = true; break;
} }
} }
sender.sendMessage("Creating new Structure"); sender.sendMessage("Creating new Structure");

View File

@ -74,10 +74,10 @@ public class CommandIrisStudioGoto extends MortarCommand
for(String i : args) for(String i : args)
{ {
if(i.equalsIgnoreCase("-cave")) if (i.equalsIgnoreCase("-cave")) {
{ cave = true;
cave = true; break;
} }
} }
IrisBiome biome = args[0].equals("this") ? g.sampleTrueBiome(p.getLocation().getBlockX(), p.getLocation().getBlockZ()) : g.loadBiome(args[0]); IrisBiome biome = args[0].equals("this") ? g.sampleTrueBiome(p.getLocation().getBlockX(), p.getLocation().getBlockZ()) : g.loadBiome(args[0]);

View File

@ -38,10 +38,10 @@ public class CommandIrisStudioPackage extends MortarCommand
for(String i : args) for(String i : args)
{ {
if(i.equalsIgnoreCase("-o")) if (i.equalsIgnoreCase("-o")) {
{ o = true;
o = true; break;
} }
} }
String dim = args[0]; String dim = args[0];