This commit is contained in:
Daniel Mills 2020-11-02 13:28:23 -05:00
parent 44358c122f
commit 19f78f769b
3 changed files with 10 additions and 1 deletions

View File

@ -38,6 +38,10 @@ public class IrisSettings
@Desc("More cpu for pregen gui but looks nice.") @Desc("More cpu for pregen gui but looks nice.")
public boolean maxPregenGuiFPS = false; public boolean maxPregenGuiFPS = false;
@DontObfuscate
@Desc("Renders what the terrain looks like in the pregen map for iris worlds only.")
public boolean pregenRenderTerrain = true;
@DontObfuscate @DontObfuscate
@Desc("Adds sound to commands.") @Desc("Adds sound to commands.")
public boolean commandSounds = true; public boolean commandSounds = true;

View File

@ -280,6 +280,11 @@ public class IrisTerrainProvider extends PostBlockTerrainProvider implements Iri
public Color render(double x, double z) public Color render(double x, double z)
{ {
if(!IrisSettings.get().pregenRenderTerrain)
{
return Color.blue;
}
int ix = (int) x; int ix = (int) x;
int iz = (int) z; int iz = (int) z;
double height = getTerrainHeight(ix, iz); double height = getTerrainHeight(ix, iz);

View File

@ -55,7 +55,7 @@ public class IrisEngine extends BlockPopulator implements Engine
@Override @Override
public void generate(int x, int z, Hunk<BlockData> vblocks, Hunk<Biome> biomes) { public void generate(int x, int z, Hunk<BlockData> vblocks, Hunk<Biome> biomes) {
Hunk<BlockData> blocks = vblocks.listen(this::catchBlockUpdates); Hunk<BlockData> blocks = vblocks.listen((xx,y,zz,t) -> catchBlockUpdates(x+xx,y+getMinHeight(),z+zz, t));
getFramework().getEngineParallax().generateParallaxArea(x, z); getFramework().getEngineParallax().generateParallaxArea(x, z);
getFramework().getBiomeActuator().actuate(x, z, biomes); getFramework().getBiomeActuator().actuate(x, z, biomes);
getFramework().getTerrainActuator().actuate(x, z, blocks); getFramework().getTerrainActuator().actuate(x, z, blocks);