mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-06 07:46:08 +00:00
Zero write detection?
This commit is contained in:
@@ -32,6 +32,7 @@ import static com.volmit.iris.engine.data.mca.LoadFlags.*;
|
||||
|
||||
public class Chunk {
|
||||
|
||||
public transient int writes = 0;
|
||||
public static final int DEFAULT_DATA_VERSION = 1628;
|
||||
|
||||
private boolean partial;
|
||||
@@ -327,6 +328,7 @@ public class Chunk {
|
||||
sections.set(sectionIndex, section);
|
||||
}
|
||||
section.setBlockStateAt(blockX, blockY, blockZ, state, cleanup);
|
||||
writes++;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -689,4 +691,16 @@ public class Chunk {
|
||||
public int sectionCount() {
|
||||
return sections.length();
|
||||
}
|
||||
|
||||
public void runLighting() {
|
||||
for(int s = 15; s >= 0; s--)
|
||||
{
|
||||
Section section = getSection(s);
|
||||
|
||||
if(section != null)
|
||||
{
|
||||
section.runLighting();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,19 @@ public class Section {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void runLighting() {
|
||||
for(int x = 1; x < 14; x++)
|
||||
{
|
||||
for(int z = 1; z < 14; z++)
|
||||
{
|
||||
for(int y = 0; y < 16; y++)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("ClassCanBeRecord")
|
||||
private static class PaletteIndex {
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import com.volmit.iris.engine.data.mca.NBTWorld;
|
||||
import com.volmit.iris.engine.data.nbt.tag.CompoundTag;
|
||||
import com.volmit.iris.engine.headless.HeadlessGenerator;
|
||||
import com.volmit.iris.engine.hunk.Hunk;
|
||||
import com.volmit.iris.engine.lighting.LightingChunk;
|
||||
import com.volmit.iris.engine.object.IrisBiome;
|
||||
import com.volmit.iris.engine.object.IrisDimension;
|
||||
import com.volmit.iris.engine.object.IrisPosition;
|
||||
@@ -546,6 +547,11 @@ public class EngineCompositeGenerator extends ChunkGenerator implements IrisAcce
|
||||
.injector((xx, yy, zz, biomeBase) -> chunk.setBiomeAt(ox + xx, yy, oz + zz,
|
||||
INMS.get().getTrueBiomeBaseId(biomeBase)))
|
||||
.build()).run();
|
||||
|
||||
if(chunk.writes == 0)
|
||||
{
|
||||
Iris.error("Chunk " + x + " " + z + " has 0 writes?");
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.bergerkiller.bukkit.common.wrappers.BlockData;
|
||||
import com.bergerkiller.bukkit.common.wrappers.ChunkSection;
|
||||
import com.bergerkiller.generated.net.minecraft.server.NibbleArrayHandle;
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.data.NibbleArray;
|
||||
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user