mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-03 00:17:15 +00:00
Cleanup terrain actuator
This commit is contained in:
parent
f5f4c5c672
commit
957de5d6f7
@ -57,20 +57,15 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
||||
public void onActuate(int x, int z, Hunk<BlockData> h, boolean multicore) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
|
||||
if (multicore) {
|
||||
BurstExecutor e = getEngine().burst().burst(h.getWidth());
|
||||
for (int xf = 0; xf < h.getWidth(); xf++) {
|
||||
int finalXf = xf;
|
||||
e.queue(() -> terrainSliver(x, z, finalXf, h));
|
||||
}
|
||||
|
||||
e.complete();
|
||||
} else {
|
||||
for (int xf = 0; xf < h.getWidth(); xf++) {
|
||||
terrainSliver(x, z, xf, h);
|
||||
}
|
||||
BurstExecutor e = getEngine().burst().burst(h.getWidth());
|
||||
e.setMulticore(multicore);
|
||||
for (int xf = 0; xf < h.getWidth(); xf++) {
|
||||
int finalXf = xf;
|
||||
e.queue(() -> terrainSliver(x, z, finalXf, h));
|
||||
}
|
||||
|
||||
e.complete();
|
||||
|
||||
getEngine().getMetrics().getTerrain().put(p.getMilliseconds());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user