geforkt von Mirrors/FastAsyncWorldEdit
Return air if attempt to retrieve block from outside range
Fixes #682
Dieser Commit ist enthalten in:
Ursprung
aeccce24a9
Commit
d5005a04e3
@ -115,6 +115,9 @@ public abstract class CharBlocks implements IBlocks {
|
|||||||
public char get(int x, @Range(from = 0, to = 255) int y, int z) {
|
public char get(int x, @Range(from = 0, to = 255) int y, int z) {
|
||||||
final int layer = y >> 4;
|
final int layer = y >> 4;
|
||||||
final int index = (y & 15) << 8 | z << 4 | x;
|
final int index = (y & 15) << 8 | z << 4 | x;
|
||||||
|
if (layer >= sections.length || layer < 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
return sections[layer].get(this, layer, index);
|
return sections[layer].get(this, layer, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren