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

This commit is contained in:
Tim Mickel 2016-06-10 08:48:39 -04:00
parent 7cc0c00da6
commit 506e9c32be

View file

@ -233,6 +233,9 @@ Runtime.prototype._step = function () {
* @param {boolean} isGlowing True to turn on glow; false to turn off. * @param {boolean} isGlowing True to turn on glow; false to turn off.
*/ */
Runtime.prototype.glowBlock = function (blockId, isGlowing) { Runtime.prototype.glowBlock = function (blockId, isGlowing) {
if (!this.blocks.getBlock(blockId)) {
return;
}
if (isGlowing) { if (isGlowing) {
this.emit(Runtime.BLOCK_GLOW_ON, blockId); this.emit(Runtime.BLOCK_GLOW_ON, blockId);
} else { } else {