mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-28 11:39:07 +00:00
Woo fixes
This commit is contained in:
@@ -397,19 +397,21 @@ public class IrisEngine implements Engine {
|
||||
context.touch();
|
||||
getEngineData().getStatistics().generatedChunk();
|
||||
try {
|
||||
|
||||
PrecisionStopwatch p = PrecisionStopwatch.start();
|
||||
Hunk<BlockData> blocks = vblocks.listen((xx, y, zz, t) -> catchBlockUpdates(x + xx, y + getMinHeight(), z + zz, t));
|
||||
|
||||
if (multicore) {
|
||||
if(getDimension().isDebugChunkCrossSections() && ((x >> 4) % getDimension().getDebugCrossSectionsMod() == 0 || (z >> 4) % getDimension().getDebugCrossSectionsMod() == 0))
|
||||
{
|
||||
for (int i = 0; i < 16; i++) {
|
||||
for (int j = 0; j < 16; j++) {
|
||||
blocks.set(i, 0, j, Material.RED_GLAZED_TERRACOTTA.createBlockData());
|
||||
blocks.set(i, 0, j, Material.CRYING_OBSIDIAN.createBlockData());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
getMantle().generateMatter(x >> 4, z >> 4, multicore);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
getMantle().generateMatter(x >> 4, z >> 4, true);
|
||||
burst().burst(multicore,
|
||||
() -> getTerrainActuator().actuate(x, z, vblocks, multicore),
|
||||
() -> getBiomeActuator().actuate(x, z, vbiomes, multicore)
|
||||
@@ -419,16 +421,12 @@ public class IrisEngine implements Engine {
|
||||
() -> getDecorantActuator().actuate(x, z, blocks, multicore),
|
||||
() -> getRavineModifier().modify(x, z, vblocks, multicore)
|
||||
);
|
||||
|
||||
getPostModifier().modify(x, z, vblocks, multicore);
|
||||
|
||||
burst().burst(multicore,
|
||||
() -> getMantle().insertMatter(x >> 4, z >> 4, BlockData.class, blocks, multicore),
|
||||
() -> getMantle().insertMatter(x >> 4, z >> 4, BlockData.class, blocks, true),
|
||||
() -> getDepositModifier().modify(x, z, vblocks, multicore)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
getMetrics().getTotal().put(p.getMilliseconds());
|
||||
generated.incrementAndGet();
|
||||
recycle();
|
||||
|
||||
@@ -136,7 +136,7 @@ public class IrisTerrainNormalActuator extends EngineAssignedActuator<BlockData>
|
||||
if (i <= he) {
|
||||
depth = he - i;
|
||||
if (blocks == null) {
|
||||
blocks = biome.generateLayers(realX, realZ, rng,
|
||||
blocks = biome.generateLayers(getDimension(), realX, realZ, rng,
|
||||
he,
|
||||
he,
|
||||
getData(),
|
||||
|
||||
@@ -81,8 +81,8 @@ public class IrisCaveModifier extends EngineAssignedModifier<BlockData> {
|
||||
continue;
|
||||
}
|
||||
|
||||
KList<BlockData> floor = cave.generateLayers(x + finalI, z + j, rng, cl.getFloor(), cl.getFloor(), getData(), getComplex());
|
||||
KList<BlockData> ceiling = cave.generateLayers(x + finalI + 656, z + j - 656, rng,
|
||||
KList<BlockData> floor = cave.generateLayers(getDimension(), x + finalI, z + j, rng, cl.getFloor(), cl.getFloor(), getData(), getComplex());
|
||||
KList<BlockData> ceiling = cave.generateLayers(getDimension(), x + finalI + 656, z + j - 656, rng,
|
||||
he - cl.getCeiling(),
|
||||
he - cl.getCeiling(), getData(), getComplex());
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ import com.volmit.iris.engine.object.block.IrisBlockDrops;
|
||||
import com.volmit.iris.engine.object.common.IRare;
|
||||
import com.volmit.iris.engine.object.decoration.IrisDecorator;
|
||||
import com.volmit.iris.engine.object.deposits.IrisDepositGenerator;
|
||||
import com.volmit.iris.engine.object.dimensional.IrisDimension;
|
||||
import com.volmit.iris.engine.object.feature.IrisFeaturePotential;
|
||||
import com.volmit.iris.engine.object.jigsaw.IrisJigsawStructurePlacement;
|
||||
import com.volmit.iris.engine.object.loot.IrisLootReference;
|
||||
@@ -43,6 +44,7 @@ import com.volmit.iris.engine.object.spawners.IrisSpawner;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import com.volmit.iris.util.collection.KMap;
|
||||
import com.volmit.iris.util.collection.KSet;
|
||||
import com.volmit.iris.util.context.IrisContext;
|
||||
import com.volmit.iris.util.data.B;
|
||||
import com.volmit.iris.util.data.DataProvider;
|
||||
import com.volmit.iris.util.data.VanillaBiomeMap;
|
||||
@@ -56,6 +58,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Biome;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@@ -65,7 +68,6 @@ import java.awt.*;
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
||||
@Desc("Represents a biome in iris. Biomes are placed inside of regions and hold objects.\nA biome consists of layers (block palletes), decorations, objects & generators.")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@@ -88,7 +90,6 @@ public class IrisBiome extends IrisRegistrant implements IRare {
|
||||
@ArrayType(min = 1, type = IrisFeaturePotential.class)
|
||||
private KList<IrisFeaturePotential> features = new KList<>();
|
||||
|
||||
|
||||
@ArrayType(min = 1, type = IrisEffect.class)
|
||||
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play around the player even if where the effect was played is no longer in the biome the player is in.")
|
||||
private KList<IrisEffect> effects = new KList<>();
|
||||
@@ -194,6 +195,7 @@ public class IrisBiome extends IrisRegistrant implements IRare {
|
||||
|
||||
private transient InferredType inferredType;
|
||||
|
||||
private static final BlockData BARRIER = Material.BARRIER.createBlockData();
|
||||
private final transient AtomicCache<KMap<String, IrisBiomeGeneratorLink>> genCache = new AtomicCache<>();
|
||||
private final transient AtomicCache<KMap<String, Integer>> genCacheMax = new AtomicCache<>();
|
||||
private final transient AtomicCache<KMap<String, Integer>> genCacheMin = new AtomicCache<>();
|
||||
@@ -326,7 +328,7 @@ public class IrisBiome extends IrisRegistrant implements IRare {
|
||||
return childrenCell.aquire(() -> getChildStyle().create(random.nextParallelRNG(sig * 2137), getLoader()).bake().scale(scale).bake());
|
||||
}
|
||||
|
||||
public KList<BlockData> generateLayers(double wx, double wz, RNG random, int maxDepth, int height, IrisData rdata, IrisComplex complex) {
|
||||
public KList<BlockData> generateLayers(IrisDimension dim, double wx, double wz, RNG random, int maxDepth, int height, IrisData rdata, IrisComplex complex) {
|
||||
if (isLockLayers()) {
|
||||
return generateLockedLayers(wx, wz, random, maxDepth, height, rdata, complex);
|
||||
}
|
||||
@@ -369,6 +371,18 @@ public class IrisBiome extends IrisRegistrant implements IRare {
|
||||
if (data.size() >= maxDepth) {
|
||||
break;
|
||||
}
|
||||
|
||||
if(dim.isExplodeBiomePalettes())
|
||||
{
|
||||
for(int j = 0; j < dim.getExplodeBiomePaletteSize(); j++)
|
||||
{
|
||||
data.add(BARRIER);
|
||||
|
||||
if (data.size() >= maxDepth) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return data;
|
||||
|
||||
@@ -86,6 +86,22 @@ public class IrisDimension extends IrisRegistrant {
|
||||
@Desc("If defined, Iris will place the given jigsaw structure where minecraft should place the overworld stronghold.")
|
||||
private String stronghold;
|
||||
|
||||
@Desc("If set to true, Iris will remove chunks to allow visualizing cross sections of chunks easily")
|
||||
private boolean debugChunkCrossSections = false;
|
||||
|
||||
@Desc("Vertically split up the biome palettes with 3 air blocks in between to visualize them")
|
||||
private boolean explodeBiomePalettes = false;
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(16)
|
||||
@Desc("Customize the palette height explosion")
|
||||
private int explodeBiomePaletteSize = 3;
|
||||
|
||||
@MinNumber(2)
|
||||
@MaxNumber(16)
|
||||
@Desc("Every X/Z % debugCrossSectionsMod == 0 cuts the chunk")
|
||||
private int debugCrossSectionsMod = 3;
|
||||
|
||||
@Desc("The average distance between strongholds")
|
||||
private int strongholdJumpDistance = 1280;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user