mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-28 05:25:42 +01:00
[Bleeding] Fix exception in getChunkSnapshot() - sky light can be null
This commit is contained in:
parent
686807e387
commit
ed2dd31a80
@ -193,8 +193,12 @@ public class CraftChunk implements Chunk {
|
|||||||
/* Get block data nibbles */
|
/* Get block data nibbles */
|
||||||
sectionBlockData[i] = new byte[2048];
|
sectionBlockData[i] = new byte[2048];
|
||||||
System.arraycopy(cs[i].j().a, 0, sectionBlockData[i], 0, 2048); // Should be getData
|
System.arraycopy(cs[i].j().a, 0, sectionBlockData[i], 0, 2048); // Should be getData
|
||||||
sectionSkyLights[i] = new byte[2048];
|
if (cs[i].l() == null) {
|
||||||
System.arraycopy(cs[i].l().a, 0, sectionSkyLights[i], 0, 2048); // Should be getSkyLight
|
sectionSkyLights[i] = emptyData;
|
||||||
|
} else {
|
||||||
|
sectionSkyLights[i] = new byte[2048];
|
||||||
|
System.arraycopy(cs[i].l().a, 0, sectionSkyLights[i], 0, 2048); // Should be getSkyLight
|
||||||
|
}
|
||||||
sectionEmitLights[i] = new byte[2048];
|
sectionEmitLights[i] = new byte[2048];
|
||||||
System.arraycopy(cs[i].k().a, 0, sectionEmitLights[i], 0, 2048); // Should be getBlockLight
|
System.arraycopy(cs[i].k().a, 0, sectionEmitLights[i], 0, 2048); // Should be getBlockLight
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user