mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 12:29:20 +00:00
More SPEED
This commit is contained in:
@@ -9,6 +9,7 @@ import com.volmit.iris.gen.atomics.AtomicCache;
|
||||
import com.volmit.iris.util.ArrayType;
|
||||
import com.volmit.iris.util.Desc;
|
||||
import com.volmit.iris.util.DontObfuscate;
|
||||
import com.volmit.iris.util.HeightMap;
|
||||
import com.volmit.iris.util.KList;
|
||||
import com.volmit.iris.util.MaxNumber;
|
||||
import com.volmit.iris.util.MinNumber;
|
||||
@@ -157,7 +158,12 @@ public class IrisDepositGenerator
|
||||
});
|
||||
}
|
||||
|
||||
public void generate(ChunkData data, RNG rng, TopographicTerrainProvider g, int cx, int cz)
|
||||
public void generate(ChunkData data, RNG rng, TopographicTerrainProvider g, int cx, int cz, boolean safe)
|
||||
{
|
||||
generate(data, rng, g, cx, cz, safe, null);
|
||||
}
|
||||
|
||||
public void generate(ChunkData data, RNG rng, TopographicTerrainProvider g, int cx, int cz, boolean safe, HeightMap he)
|
||||
{
|
||||
for(int l = 0; l < rng.i(getMinPerChunk(), getMaxPerChunk()); l++)
|
||||
{
|
||||
@@ -174,7 +180,7 @@ public class IrisDepositGenerator
|
||||
|
||||
int x = rng.i(af, bf);
|
||||
int z = rng.i(af, bf);
|
||||
int height = (int) (Math.round(g.getCarvedWaterHeight((cx << 4) + x, (cz << 4) + z))) - 7;
|
||||
int height = (he != null ? he.getHeight((cx << 4) + x, (cz << 4) + z) : (int) (Math.round(g.getCarvedWaterHeight((cx << 4) + x, (cz << 4) + z)))) - 7;
|
||||
|
||||
if(height <= 0)
|
||||
{
|
||||
@@ -207,14 +213,18 @@ public class IrisDepositGenerator
|
||||
continue;
|
||||
}
|
||||
|
||||
boolean allow = false;
|
||||
BlockData b = data.getBlockData(nx, ny, nz);
|
||||
for(BlockData f : g.getDimension().getRockPalette().getBlockData())
|
||||
boolean allow = !safe;
|
||||
|
||||
if(!allow)
|
||||
{
|
||||
if(f.getMaterial().equals(b.getMaterial()))
|
||||
BlockData b = data.getBlockData(nx, ny, nz);
|
||||
for(BlockData f : g.getDimension().getRockPalette().getBlockData())
|
||||
{
|
||||
allow = true;
|
||||
break;
|
||||
if(f.getMaterial().equals(b.getMaterial()))
|
||||
{
|
||||
allow = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,10 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("The human readable name of this dimension")
|
||||
private String name = "A Dimension";
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Create an inverted dimension in the sky (like the nether)")
|
||||
private IrisDimension sky = null;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Place text on terrain")
|
||||
@ArrayType(min = 1, type = IrisTextPlacement.class)
|
||||
@@ -307,6 +311,7 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("Define biome mutations for this dimension")
|
||||
private KList<IrisBiomeMutation> mutations = new KList<>();
|
||||
|
||||
private transient boolean skyDimension = false;
|
||||
private final transient AtomicCache<ChunkPosition> parallaxSize = new AtomicCache<>();
|
||||
private final transient AtomicCache<KList<IrisPostBlockFilter>> cacheFilters = new AtomicCache<>();
|
||||
private final transient AtomicCache<CNG> rockLayerGenerator = new AtomicCache<>();
|
||||
@@ -316,6 +321,11 @@ public class IrisDimension extends IrisRegistrant
|
||||
private final transient AtomicCache<Double> cosr = new AtomicCache<>();
|
||||
private final transient AtomicCache<Double> rad = new AtomicCache<>();
|
||||
|
||||
public boolean hasSky()
|
||||
{
|
||||
return getSky() != null;
|
||||
}
|
||||
|
||||
public static KList<IrisCompatabilityFilter> getDefaultCompatability()
|
||||
{
|
||||
KList<IrisCompatabilityFilter> filters = new KList<>();
|
||||
|
||||
Reference in New Issue
Block a user