mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Its faster to be sync when you're already mutlicore...
This commit is contained in:
parent
d3c47fe1a4
commit
c99c7ee6c9
@ -62,16 +62,12 @@ public class IrisBiomeActuator extends EngineAssignedActuator<Biome> {
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<Biome> h) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
int zf, hh;
|
||||
BurstExecutor burst = MultiBurst.burst.burst(h.getWidth() * h.getDepth());
|
||||
int zf;
|
||||
|
||||
for (int xf = 0; xf < h.getWidth(); xf++) {
|
||||
for (zf = 0; zf < h.getDepth(); zf++) {
|
||||
int xxf = xf;
|
||||
int zzf = zf;
|
||||
|
||||
burst.queue(() -> {
|
||||
IrisBiome ib = getComplex().getTrueBiomeStream().get(modX(xxf + x), modZ(zzf + z));
|
||||
IrisBiome ib = getComplex().getTrueBiomeStream().get(modX(xf + x), modZ(zf + z));
|
||||
|
||||
if (ib.isCustom()) {
|
||||
try {
|
||||
@ -83,27 +79,24 @@ public class IrisBiomeActuator extends EngineAssignedActuator<Biome> {
|
||||
}
|
||||
|
||||
for (int i = 0; i < h.getHeight(); i++) {
|
||||
injectBiome(h, xxf, i, zzf, biomeBase);
|
||||
injectBiome(h, xf, i, zf, biomeBase);
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
e.printStackTrace();
|
||||
Biome v = ib.getSkyBiome(rng, x, 0, z);
|
||||
for (int i = 0; i < h.getHeight(); i++) {
|
||||
h.set(xxf, i, zzf, v);
|
||||
h.set(xf, i, zf, v);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Biome v = ib.getSkyBiome(rng, x, 0, z);
|
||||
for (int i = 0; i < h.getHeight(); i++) {
|
||||
h.set(xxf, i, zzf, v);
|
||||
h.set(xf, i, zf, v);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
burst.complete();
|
||||
|
||||
getEngine().getMetrics().getBiome().put(p.getMilliseconds());
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user