Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 16:40:10 +01:00
Fix stupidity, thanks @Pokechu22 <3
Dieser Commit ist enthalten in:
Ursprung
598d0f96d8
Commit
7d2ef743ac
@ -105,8 +105,6 @@ public class ChunkSection1_9_1_2 implements ChunkSection {
|
|||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public void readBlocks(ByteBuf input) throws Exception {
|
public void readBlocks(ByteBuf input) throws Exception {
|
||||||
// Clear current data
|
|
||||||
// Arrays.fill(blocks, 0);
|
|
||||||
palette.clear();
|
palette.clear();
|
||||||
|
|
||||||
// Reaad bits per block
|
// Reaad bits per block
|
||||||
@ -122,11 +120,9 @@ public class ChunkSection1_9_1_2 implements ChunkSection {
|
|||||||
if (bitsPerBlock > 8) {
|
if (bitsPerBlock > 8) {
|
||||||
bitsPerBlock = 13;
|
bitsPerBlock = 13;
|
||||||
}
|
}
|
||||||
System.out.println("bps: " + bitsPerBlock);
|
|
||||||
if(bitsPerBlock != 13) {
|
|
||||||
// Read palette
|
|
||||||
int paletteLength = Type.VAR_INT.read(input);
|
int paletteLength = Type.VAR_INT.read(input);
|
||||||
|
if (bitsPerBlock != 13) {
|
||||||
|
// Read palette
|
||||||
for (int i = 0; i < paletteLength; i++) {
|
for (int i = 0; i < paletteLength; i++) {
|
||||||
if (bitsPerBlock != 13) {
|
if (bitsPerBlock != 13) {
|
||||||
palette.add(Type.VAR_INT.read(input));
|
palette.add(Type.VAR_INT.read(input));
|
||||||
@ -134,14 +130,11 @@ public class ChunkSection1_9_1_2 implements ChunkSection {
|
|||||||
Type.VAR_INT.read(input);
|
Type.VAR_INT.read(input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("length of palette: " + paletteLength);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read blocks
|
// Read blocks
|
||||||
int blockLength = Type.VAR_INT.read(input);
|
Long[] blockData = Type.LONG_ARRAY.read(input);
|
||||||
if (blockLength > 0) {
|
if (blockData.length > 0) {
|
||||||
long[] blockData = new long[blockLength];
|
|
||||||
System.out.println("Block Length: " + blockData.length);
|
|
||||||
for (int i = 0; i < blocks.length; i++) {
|
for (int i = 0; i < blocks.length; i++) {
|
||||||
int bitIndex = i * bitsPerBlock;
|
int bitIndex = i * bitsPerBlock;
|
||||||
int startIndex = bitIndex / 64;
|
int startIndex = bitIndex / 64;
|
||||||
@ -165,7 +158,6 @@ public class ChunkSection1_9_1_2 implements ChunkSection {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println("done");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren