mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 10:43:14 +00:00
MPC Actuator support
This commit is contained in:
parent
8d967856b5
commit
48f581525e
@ -63,7 +63,7 @@ public class IrisBiomeActuator extends EngineAssignedActuator<Biome> {
|
||||
|
||||
@BlockCoordinates
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<Biome> h) {
|
||||
public void onActuate(int x, int z, Hunk<Biome> h, boolean multicore) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
int zf, maxHeight;
|
||||
IrisBiome ib;
|
||||
|
@ -80,7 +80,7 @@ public class IrisDecorantActuator extends EngineAssignedActuator<BlockData> {
|
||||
|
||||
@BlockCoordinates
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<BlockData> output) {
|
||||
public void onActuate(int x, int z, Hunk<BlockData> output, boolean multicore) {
|
||||
if (!getEngine().getDimension().isDecorate()) {
|
||||
return;
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class IrisTerrainIslandActuator extends EngineAssignedActuator<BlockData>
|
||||
|
||||
@BlockCoordinates
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<BlockData> h) {
|
||||
public void onActuate(int x, int z, Hunk<BlockData> h, boolean multicore) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
int i, zf, depth, surface, realX, realZ;
|
||||
IrisBiome biome;
|
||||
|
@ -51,15 +51,27 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
||||
|
||||
@BlockCoordinates
|
||||
@Override
|
||||
public void onActuate(int x, int z, Hunk<BlockData> h) {
|
||||
public void onActuate(int x, int z, Hunk<BlockData> h, boolean multicore) {
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
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));
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
e.complete();
|
||||
getEngine().getMetrics().getTerrain().put(p.getMilliseconds());
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user