MCPcopy Create free account
hub / github.com/Garten/sourcecraft / readBlocksRaw

Method readBlocksRaw

src/minecraft/McaSection.java:35–46  ·  view source on GitHub ↗
(NbtReader source)

Source from the content-addressed store, hash-verified

33 }
34
35 public void readBlocksRaw(NbtReader source) throws IOException {
36 int length = source.readLength();
37 int unitSize = this.getUnitLength(length);
38 BitNbtReader reader = new BitNbtReader(source, unitSize);
39 for (int y = 0; y < Minecraft.SECTION_SIZE_Y; y++) {
40 for (int z = 0; z < Minecraft.CHUNK_SIZE_Z; z++) {
41 for (int x = 0; x < Minecraft.CHUNK_SIZE_X; x++) {
42 this.block[x][y][z] = reader.readBits();
43 }
44 }
45 }
46 }
47
48 private int getUnitLength(int length) {
49 return length / 64;

Callers 1

readSectionMethod · 0.95

Calls 3

getUnitLengthMethod · 0.95
readBitsMethod · 0.95
readLengthMethod · 0.80

Tested by

no test coverage detected