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