From 5aef10d41b9a52ff8fde13cdf91803c9351d879a Mon Sep 17 00:00:00 2001 From: Morlok8k Date: Tue, 5 Jun 2012 03:19:46 -0700 Subject: [PATCH] minor code cleanup. I got rid of some unnessary casting. --- src/corrodias/minecraft/landgenerator/Main.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/corrodias/minecraft/landgenerator/Main.java b/src/corrodias/minecraft/landgenerator/Main.java index dabe4d5..75d6ef2 100644 --- a/src/corrodias/minecraft/landgenerator/Main.java +++ b/src/corrodias/minecraft/landgenerator/Main.java @@ -528,8 +528,8 @@ public class Main { blah = Math.floor(xRange / xLoops); //optimal distance calculations here incrementX = blah.intValue(); //save to an int blah = - Math.floor((double) xRange - / Math.ceil(((double) xRange / ((double) increment + 20)))); + Math.floor(xRange + / Math.ceil((xRange / ((double) increment + 20)))); if (blah < increment) { //should we use 380 or 400 as our original increment? This decides it. incrementX = blah.intValue(); } @@ -547,8 +547,8 @@ public class Main { blah = Math.floor(zRange / zLoops); //optimal distance calculations here incrementZ = blah.intValue(); //save to an int blah = - Math.floor((double) zRange - / Math.ceil(((double) zRange / ((double) increment + 20)))); + Math.floor(zRange + / Math.ceil((zRange / ((double) increment + 20)))); if (blah < increment) { //should we use 380 or 400 as our original increment? This decides it. incrementZ = blah.intValue(); } @@ -608,7 +608,7 @@ public class Main { //String curY = "64"; //Y is always set to 64 String curZ = Integer.toString(currentZ + zOffset); String percentDone = - Double.toString((double) ((double) currentIteration / (double) totalIterations) * 100); + Double.toString(((double) currentIteration / (double) totalIterations) * 100); int percentIndex = ((percentDone.indexOf(".") + 3) > percentDone.length()) ? percentDone .length() : (percentDone.indexOf(".") + 3); //fix index on numbers like 12.3 @@ -1581,7 +1581,7 @@ public class Main { } while (e.hasMoreElements()) { - ZipEntry entry = (ZipEntry) e.nextElement(); + ZipEntry entry = e.nextElement(); Long modTime = entry.getTime();