blob: da35627354fee18463ba3bc12611d1a4e00ecca8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--- a/net/minecraft/server/ChunkSection.java
+++ b/net/minecraft/server/ChunkSection.java
@@ -19,6 +19,24 @@
}
+ // CraftBukkit start
+ public ChunkSection(int y, boolean flag, char[] blockIds) {
+ this.yPos = y;
+ this.blockIds = new DataPaletteBlock();
+ for (int i = 0; i < blockIds.length; i++) {
+ int xx = i & 15;
+ int yy = (i >> 8) & 15;
+ int zz = (i >> 4) & 15;
+ this.blockIds.setBlock(xx, yy, zz, Block.REGISTRY_ID.fromId(blockIds[i]));
+ }
+ this.emittedLight = new NibbleArray();
+ if (flag) {
+ this.skyLight = new NibbleArray();
+ }
+ recalcBlockCounts();
+ }
+ // CraftBukkit end
+
public IBlockData getType(int i, int j, int k) {
return this.blockIds.a(i, j, k);
}
|