implement torch on wall

This commit is contained in:
LabyStudio
2022-02-13 04:17:03 +01:00
parent 9078d34ab0
commit bcdbe4240b
9 changed files with 215 additions and 40 deletions
+6
View File
@@ -224,7 +224,13 @@ window.Minecraft = class {
if (!placedBoundingBox.intersects(this.player.boundingBox)) {
let typeId = this.inventory.getItemInSelectedSlot();
if (typeId !== 0) {
// Place block
this.world.setBlockAt(x, y, z, typeId);
// Handle block abilities
let block = Block.getById(typeId);
block.onBlockPlaced(this.world, x, y, z, hitResult.face);
}
}
}