mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-30 12:29:20 +00:00
Config options & fix cave slabs for 2x lines
This commit is contained in:
@@ -8,7 +8,6 @@ import org.bukkit.util.BlockVector;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.gen.ContextualTerrainProvider;
|
||||
import com.volmit.iris.gen.ParallelTerrainProvider;
|
||||
import com.volmit.iris.gen.PostBlockTerrainProvider;
|
||||
import com.volmit.iris.gen.atomics.AtomicCache;
|
||||
import com.volmit.iris.noise.CNG;
|
||||
import com.volmit.iris.util.ArrayType;
|
||||
@@ -142,7 +141,7 @@ public class IrisDimension extends IrisRegistrant
|
||||
@DontObfuscate
|
||||
@Desc("Carve terrain or not")
|
||||
private boolean carving = true;
|
||||
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Generate vanilla caves")
|
||||
private boolean vanillaCaves = false;
|
||||
@@ -159,10 +158,17 @@ public class IrisDimension extends IrisRegistrant
|
||||
@Desc("Use post processing or not")
|
||||
private boolean postProcessing = true;
|
||||
|
||||
@ArrayType(min = 1, type = IrisPostProcessor.class)
|
||||
@DontObfuscate
|
||||
@Desc("Post Processors")
|
||||
private KList<IrisPostProcessor> postProcessors = getDefaultPostProcessors();
|
||||
@Desc("Add slabs in post processing")
|
||||
private boolean postProcessingSlabs = true;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Add painted walls in post processing")
|
||||
private boolean postProcessingWalls = true;
|
||||
|
||||
@DontObfuscate
|
||||
@Desc("Use post processing for caves or not")
|
||||
private boolean postProcessCaves = true;
|
||||
|
||||
@ArrayType(min = 1, type = IrisCompatabilityFilter.class)
|
||||
@DontObfuscate
|
||||
@@ -315,31 +321,6 @@ public class IrisDimension extends IrisRegistrant
|
||||
private transient AtomicCache<Double> cosr = new AtomicCache<>();
|
||||
private transient AtomicCache<Double> rad = new AtomicCache<>();
|
||||
|
||||
public KList<IrisPostBlockFilter> getPostBlockProcessors(PostBlockTerrainProvider g)
|
||||
{
|
||||
return cacheFilters.aquire(() ->
|
||||
{
|
||||
KList<IrisPostBlockFilter> cacheFilters = new KList<>();
|
||||
|
||||
for(IrisPostProcessor i : getPostProcessors())
|
||||
{
|
||||
cacheFilters.add(g.createProcessor(i.getProcessor(), i.getPhase()));
|
||||
}
|
||||
|
||||
g.setMinPhase(0);
|
||||
g.setMaxPhase(0);
|
||||
|
||||
for(IrisPostBlockFilter i : cacheFilters)
|
||||
{
|
||||
g.setMinPhase(Math.min(g.getMinPhase(), i.getPhase()));
|
||||
g.setMaxPhase(Math.max(g.getMaxPhase(), i.getPhase()));
|
||||
}
|
||||
|
||||
Iris.info("Post Processing: " + cacheFilters.size() + " filters. Phases: " + g.getMinPhase() + " - " + g.getMaxPhase());
|
||||
return cacheFilters;
|
||||
});
|
||||
}
|
||||
|
||||
public static KList<IrisCompatabilityFilter> getDefaultCompatability()
|
||||
{
|
||||
KList<IrisCompatabilityFilter> filters = new KList<>();
|
||||
@@ -490,17 +471,6 @@ public class IrisDimension extends IrisRegistrant
|
||||
});
|
||||
}
|
||||
|
||||
private KList<IrisPostProcessor> getDefaultPostProcessors()
|
||||
{
|
||||
KList<IrisPostProcessor> p = new KList<IrisPostProcessor>();
|
||||
|
||||
p.add(new IrisPostProcessor("wall-painter"));
|
||||
p.add(new IrisPostProcessor("slabber"));
|
||||
p.add(new IrisPostProcessor("waterlogger", 1));
|
||||
|
||||
return p;
|
||||
}
|
||||
|
||||
public BlockData getRock(RNG rng, double x, double y, double z)
|
||||
{
|
||||
if(getRockData().isEmpty())
|
||||
|
||||
@@ -43,8 +43,7 @@ public class IrisEntityInitialSpawn
|
||||
private transient AtomicCache<RNG> rng = new AtomicCache<>();
|
||||
private transient AtomicCache<IrisEntity> ent = new AtomicCache<>();
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public boolean spawn(ParallaxTerrainProvider gen, Chunk c, RNG rng)
|
||||
public void spawn(ParallaxTerrainProvider gen, Chunk c, RNG rng)
|
||||
{
|
||||
int spawns = rng.i(1, rarity) == 1 ? rng.i(minSpawns, maxSpawns) : 0;
|
||||
|
||||
@@ -55,11 +54,9 @@ public class IrisEntityInitialSpawn
|
||||
int x = (c.getX() * 16) + rng.i(15);
|
||||
int z = (c.getZ() * 16) + rng.i(15);
|
||||
int h = gen.getCarvedHeight(x, z, false);
|
||||
return spawn100(gen, new Location(c.getWorld(), x, h, z)) != null;
|
||||
spawn100(gen, new Location(c.getWorld(), x, h, z));
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public IrisEntity getRealEntity(ParallaxTerrainProvider g)
|
||||
|
||||
Reference in New Issue
Block a user