Zero write detection?

This commit is contained in:
Daniel Mills
2021-07-22 20:49:00 -04:00
parent 5dae1ee34f
commit d06657e2ff
5 changed files with 45 additions and 10 deletions

View File

@@ -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();
}
}
}
}

View File

@@ -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 {