implement torch on wall
This commit is contained in:
@@ -278,11 +278,20 @@ window.World = class {
|
||||
this.onBlockChanged(x, y, z);
|
||||
}
|
||||
|
||||
setBlockDataAt(x, y, z, data) {
|
||||
this.getChunkAt(x >> 4, z >> 4).setBlockDataAt(x & 15, y, z & 15, data);
|
||||
}
|
||||
|
||||
getBlockAt(x, y, z) {
|
||||
let chunkSection = this.getChunkAtBlock(x, y, z);
|
||||
return chunkSection == null ? 0 : chunkSection.getBlockAt(x & 15, y & 15, z & 15);
|
||||
}
|
||||
|
||||
getBlockDataAt(x, y, z) {
|
||||
let chunkSection = this.getChunkAtBlock(x, y, z);
|
||||
return chunkSection == null ? 0 : chunkSection.getBlockDataAt(x & 15, y & 15, z & 15);
|
||||
}
|
||||
|
||||
getBlockAtFace(x, y, z, face) {
|
||||
return this.getBlockAt(x + face.x, y + face.y, z + face.z);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user