Dieser Commit ist enthalten in:
Jesse Boyd 2019-04-11 00:49:16 +10:00
Ursprung b9cefc1936
Commit 0ef97ccf28
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 59F1DE6293AF6E1F
2 geänderte Dateien mit 8 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -84,7 +84,7 @@ public abstract class MCAWriter {
protected WritableMCAChunk initialValue() {
WritableMCAChunk chunk = new WritableMCAChunk();
Arrays.fill(chunk.blocks, BlockID.AIR);
Arrays.fill(chunk.skyLight, (byte) 255);
// Arrays.fill(chunk.skyLight, (byte) 255);
return chunk;
}
};

Datei anzeigen

@ -91,12 +91,12 @@ public class WritableMCAChunk extends FaweChunk<Void> {
public void write(NBTOutputStream nbtOut) throws IOException {
nbtOut.writeNamedTagName("", NBTConstants.TYPE_COMPOUND);
nbtOut.writeNamedTag("DataVersion", 1631);
nbtOut.writeLazyCompoundTag("Level", out -> {
out.writeNamedTag("V", (byte) 1);
// out.writeNamedTag("V", (byte) 1);
out.writeNamedTag("Status", "decorated");
out.writeNamedTag("xPos", getX());
out.writeNamedTag("zPos", getZ());
out.writeNamedTag("LightPopulated", (byte) 0);
out.writeNamedTag("TerrainPopulated", (byte) 1);
if (entities.isEmpty()) {
out.writeNamedEmptyList("Entities");
} else {
@ -180,7 +180,9 @@ public class WritableMCAChunk extends FaweChunk<Void> {
int bitsPerEntry = MathMan.log2nlz(num_palette - 1);
int blockBitArrayEnd = (bitsPerEntry * 4096) >> 6;
if (num_palette == 1) {
Arrays.fill(blockstates, 0, blockBitArrayEnd, 0);
// Set a value, because minecraft needs it for some reason
blockstates[0] = 0;
blockBitArrayEnd = 1;
} else {
BitArray4096 bitArray = new BitArray4096(blockstates, bitsPerEntry);
bitArray.fromRaw(blocks, blockIndexStart);
@ -357,7 +359,7 @@ public class WritableMCAChunk extends FaweChunk<Void> {
}
public void removeLight() {
for (int i = 0; i < skyLight.length; i++) {
for (int i = 0; i < 16; i++) {
removeLight(i);
}
}