Don't attempt to glow a block that isn't known in the VM

This commit is contained in:
Tim Mickel committed 2016-06-10 08:48:39 -04:00
1 parent 7cc0c00da6
commit 506e9c32be
1 file changed
+3
+3
View File
@@ -233,6 +233,9 @@ Runtime.prototype._step = function () {
* @param {boolean} isGlowing True to turn on glow; false to turn off.
*/
Runtime.prototype.glowBlock = function (blockId, isGlowing) {
if (!this.blocks.getBlock(blockId)) {
return;
}
if (isGlowing) {
this.emit(Runtime.BLOCK_GLOW_ON, blockId);
} else {