This commit is contained in:
Daniel Mills 2021-01-04 21:58:52 -05:00
parent bc8f25ff4b
commit c6aad25ef2
2 changed files with 33 additions and 7 deletions

View File

@ -1,6 +1,7 @@
package com.volmit.iris.manager;
import com.volmit.iris.Iris;
import com.volmit.iris.object.IrisFeaturePositional;
import com.volmit.iris.scaffold.IrisWorlds;
import com.volmit.iris.scaffold.engine.Engine;
import com.volmit.iris.scaffold.engine.IrisAccess;
@ -131,6 +132,26 @@ public class IrisBoardManager implements BoardProvider, Listener
}
KList<IrisFeaturePositional> features = new KList<>();
if(engine != null);
{
engine.getFramework().getEngineParallax().forEachFeature(x, z, features::add);
if(features.isNotEmpty())
{
v.add("&7&m------------------");
int m = 0;
for(IrisFeaturePositional i : features)
{
m++;
v.add(C.AQUA + "Feature #" + m + C.GRAY + ": " + Form.pc(i.getStrength(x, z), 0));
}
}
}
v.add("&7&m------------------");
return v;

View File

@ -124,12 +124,17 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
for (j = -s; j <= s; j++) {
int jj = j;
if (!getParallaxAccess().isFeatureGenerated(((ii * 16) + x) >> 4, ((jj * 16) + z) >> 4)) {
RNG rng = new RNG(Cache.key(x, z)).nextParallelRNG(getEngine().getTarget().getWorld().getSeed());
IrisRegion region = getComplex().getRegionStream().get(x + 8, z + 8);
IrisBiome biome = getComplex().getTrueBiomeStream().get(x + 8, z + 8);
b.queue(() -> generateParallaxFeatures(rng, ((ii * 16) + x) >> 4, ((jj * 16) + z) >> 4, region, biome));
getParallaxAccess().setFeatureGenerated(((ii * 16) + x) >> 4, ((jj * 16) + z) >> 4);
int xxx = ((ii * 16) + (x));
int zzz = ((jj * 16) + (z));
int xx = xxx >> 4;
int zz = zzz >> 4;
if (!getParallaxAccess().isFeatureGenerated(xx, zz)){
RNG rng = new RNG(Cache.key(xx, zz)).nextParallelRNG(getEngine().getTarget().getWorld().getSeed());
IrisRegion region = getComplex().getRegionStream().get(xxx, zzz);
IrisBiome biome = getComplex().getTrueBiomeStream().get(xxx, zzz);
b.queue(() -> generateParallaxFeatures(rng, xx, zz, region, biome));
getParallaxAccess().setFeatureGenerated(xx, zz);
}
}
}
@ -164,7 +169,7 @@ public interface EngineParallaxManager extends DataProvider, IObjectPlacer {
for(j = -s; j <= s; j++)
{
int jj = j;
ParallaxChunkMeta m = getParallaxAccess().getMetaR(((ii*16)+cx)>>4, ((jj*16)+cz)>>4);
ParallaxChunkMeta m = getParallaxAccess().getMetaR(ii+cx, jj+cz);
for(IrisFeaturePositional k : m.getZones())
{