mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Tweak feature iteration
This commit is contained in:
parent
dff88403b5
commit
302f54971d
@ -138,7 +138,7 @@ public class IrisBoardManager implements BoardProvider, Listener {
|
||||
if (engine != null) {
|
||||
v.add("&7&m------------------");
|
||||
KList<IrisFeaturePositional> f = new KList<>();
|
||||
engine.getFramework().getEngineParallax().forEachFeature(x, z, f::add);
|
||||
f.add(engine.getFramework().getEngineParallax().forEachFeature(x, z));
|
||||
v.add(C.AQUA + "Engine" + C.GRAY + ": " + engine.getName() + " " + engine.getMinHeight() + "-" + engine.getMaxHeight());
|
||||
v.add(C.AQUA + "Region" + C.GRAY + ": " + engine.getRegion(x, z).getName());
|
||||
v.add(C.AQUA + "Biome" + C.GRAY + ": " + engine.getBiome(x, y, z).getName());
|
||||
|
@ -205,8 +205,11 @@ public class IrisComplex implements DataProvider {
|
||||
objectChanceStream = ProceduralStream.ofDouble((x, z) -> {
|
||||
if (engine.getDimension().hasFeatures(engine)) {
|
||||
AtomicDouble str = new AtomicDouble(1D);
|
||||
engine.getFramework().getEngineParallax().forEachFeature(x, z, (i)
|
||||
-> str.set(Math.min(str.get(), i.getObjectChanceModifier(x, z, rng))));
|
||||
for(IrisFeaturePositional i : engine.getFramework().getEngineParallax().forEachFeature(x, z))
|
||||
{
|
||||
str.set(Math.min(str.get(), i.getObjectChanceModifier(x, z, rng)));
|
||||
}
|
||||
|
||||
return str.get();
|
||||
}
|
||||
|
||||
@ -409,8 +412,12 @@ public class IrisComplex implements DataProvider {
|
||||
}
|
||||
|
||||
AtomicDouble noise = new AtomicDouble(h + fluidHeight + overlayStream.get(x, z));
|
||||
engine.getFramework().getEngineParallax().forEachFeature(x, z, (i)
|
||||
-> noise.set(i.filter(x, z, noise.get(), rng)));
|
||||
|
||||
for(IrisFeaturePositional i : engine.getFramework().getEngineParallax().forEachFeature(x, z))
|
||||
{
|
||||
noise.set(i.filter(x, z, noise.get(), rng));
|
||||
}
|
||||
|
||||
return Math.min(engine.getHeight(), Math.max(noise.get(), 0));
|
||||
}
|
||||
|
||||
|
@ -198,21 +198,8 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
}
|
||||
}
|
||||
|
||||
@BlockCoordinates
|
||||
default void forEachFeature(double x, double z, Consumer<IrisFeaturePositional> f) {
|
||||
if (!getEngine().getDimension().hasFeatures(getEngine())) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (IrisFeaturePositional ipf : forEachFeature(x, z)) {
|
||||
f.accept(ipf);
|
||||
}
|
||||
}
|
||||
|
||||
@BlockCoordinates
|
||||
default KList<IrisFeaturePositional> forEachFeature(double x, double z) {
|
||||
synchronized (getEngine())
|
||||
{
|
||||
KList<IrisFeaturePositional> pos = new KList<>();
|
||||
|
||||
if (!getEngine().getDimension().hasFeatures(getEngine())) {
|
||||
@ -251,7 +238,6 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
|
||||
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
|
||||
@ChunkCoordinates
|
||||
@SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
|
||||
|
Loading…
x
Reference in New Issue
Block a user