mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 18:55:18 +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
|
@BlockCoordinates
|
||||||
@Override
|
@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();
|
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||||
int zf, maxHeight;
|
int zf, maxHeight;
|
||||||
IrisBiome ib;
|
IrisBiome ib;
|
||||||
|
@ -80,7 +80,7 @@ public class IrisDecorantActuator extends EngineAssignedActuator<BlockData> {
|
|||||||
|
|
||||||
@BlockCoordinates
|
@BlockCoordinates
|
||||||
@Override
|
@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()) {
|
if (!getEngine().getDimension().isDecorate()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@ public class IrisTerrainIslandActuator extends EngineAssignedActuator<BlockData>
|
|||||||
|
|
||||||
@BlockCoordinates
|
@BlockCoordinates
|
||||||
@Override
|
@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();
|
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||||
int i, zf, depth, surface, realX, realZ;
|
int i, zf, depth, surface, realX, realZ;
|
||||||
IrisBiome biome;
|
IrisBiome biome;
|
||||||
|
@ -51,8 +51,11 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
|||||||
|
|
||||||
@BlockCoordinates
|
@BlockCoordinates
|
||||||
@Override
|
@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();
|
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||||
|
|
||||||
|
if(multicore)
|
||||||
|
{
|
||||||
BurstExecutor e = getEngine().burst().burst(h.getWidth());
|
BurstExecutor e = getEngine().burst().burst(h.getWidth());
|
||||||
for (int xf = 0; xf < h.getWidth(); xf++) {
|
for (int xf = 0; xf < h.getWidth(); xf++) {
|
||||||
int finalXf = xf;
|
int finalXf = xf;
|
||||||
@ -60,6 +63,15 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
|||||||
}
|
}
|
||||||
|
|
||||||
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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user