This commit is contained in:
Daniel Mills
2021-07-27 17:34:51 -04:00
parent 8f7db7e52f
commit fc678684f5
9 changed files with 23 additions and 46 deletions

View File

@@ -18,7 +18,6 @@
package com.volmit.iris.engine.modifier;
import com.volmit.iris.Iris;
import com.volmit.iris.engine.data.B;
import com.volmit.iris.engine.framework.Engine;
import com.volmit.iris.engine.framework.EngineAssignedModifier;
@@ -56,8 +55,7 @@ public class IrisCaveModifier extends EngineAssignedModifier<BlockData> {
}
PrecisionStopwatch p = PrecisionStopwatch.start();
if(multicore)
{
if (multicore) {
BurstExecutor e = getEngine().burst().burst(a.getWidth());
for (int i = 0; i < a.getWidth(); i++) {
int finalI = i;
@@ -65,10 +63,7 @@ public class IrisCaveModifier extends EngineAssignedModifier<BlockData> {
}
e.complete();
}
else
{
} else {
for (int i = 0; i < a.getWidth(); i++) {
modifySliver(x, z, i, a);
}
@@ -77,8 +72,7 @@ public class IrisCaveModifier extends EngineAssignedModifier<BlockData> {
getEngine().getMetrics().getCave().put(p.getMilliseconds());
}
public void modifySliver(int x, int z, int finalI, Hunk<BlockData> a)
{
public void modifySliver(int x, int z, int finalI, Hunk<BlockData> a) {
for (int j = 0; j < a.getDepth(); j++) {
KList<CaveResult> caves = genCaves(x + finalI, z + j, finalI, j, a);
int he = (int) Math.round(getComplex().getHeightStream().get(x + finalI, z + j));

View File

@@ -51,8 +51,7 @@ public class IrisPostModifier extends EngineAssignedModifier<BlockData> {
PrecisionStopwatch p = PrecisionStopwatch.start();
int i;
AtomicInteger j = new AtomicInteger();
if(multicore)
{
if (multicore) {
BurstExecutor e = getEngine().burst().burst(output.getWidth());
for (i = 0; i < output.getWidth(); i++) {
int finalI = i;
@@ -63,10 +62,7 @@ public class IrisPostModifier extends EngineAssignedModifier<BlockData> {
});
}
e.complete();
}
else
{
} else {
for (i = 0; i < output.getWidth(); i++) {
for (j.set(0); j.get() < output.getDepth(); j.getAndIncrement()) {
post(i, j.get(), output, i + x, j.get() + z);