mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-20 22:18:58 +01:00
Fixed fatal crashes when there's a block at maxheight at spawn - this fixes BUKKIT-922.
This commit is contained in:
parent
ede443234e
commit
61fb069c61
1 changed files with 2 additions and 0 deletions
|
@ -330,12 +330,14 @@ public class Chunk {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTypeId(int i, int j, int k) {
|
public int getTypeId(int i, int j, int k) {
|
||||||
|
if (j >> 4 >= sections.length) return 0;
|
||||||
ChunkSection chunksection = this.sections[j >> 4];
|
ChunkSection chunksection = this.sections[j >> 4];
|
||||||
|
|
||||||
return chunksection != null ? chunksection.a(i, j & 15, k) : 0;
|
return chunksection != null ? chunksection.a(i, j & 15, k) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getData(int i, int j, int k) {
|
public int getData(int i, int j, int k) {
|
||||||
|
if (j >> 4 >= sections.length) return 0;
|
||||||
ChunkSection chunksection = this.sections[j >> 4];
|
ChunkSection chunksection = this.sections[j >> 4];
|
||||||
|
|
||||||
return chunksection != null ? chunksection.b(i, j & 15, k) : 0;
|
return chunksection != null ? chunksection.b(i, j & 15, k) : 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue