From a5a31e462c15d5bcf559276fa19a71fc97ad7a24 Mon Sep 17 00:00:00 2001 From: Lucas Dower Date: Tue, 22 Mar 2022 21:08:44 +0000 Subject: [PATCH] Remove debug console logs --- src/block_mesh.ts | 4 ---- src/mesh.ts | 3 +-- src/schematic.ts | 4 ++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/block_mesh.ts b/src/block_mesh.ts index ba50dc3..885178c 100644 --- a/src/block_mesh.ts +++ b/src/block_mesh.ts @@ -28,16 +28,12 @@ export class BlockMesh { } private constructor(voxelMesh: VoxelMesh) { - LOG('New block mesh'); - this._blockPalette = []; this._blocks = []; this._voxelMesh = voxelMesh; } private _assignBlocks(blockMeshParams: BlockMeshParams) { - LOG('Assigning blocks'); - BlockAtlas.Get.loadAtlas(blockMeshParams.textureAtlas); BlockAtlas.Get.loadPalette(blockMeshParams.blockPalette); diff --git a/src/mesh.ts b/src/mesh.ts index e420958..07587c4 100644 --- a/src/mesh.ts +++ b/src/mesh.ts @@ -182,7 +182,6 @@ export class Mesh extends Warnable { if (!centre.isNumber()) { throw new CustomError('Could not find centre of mesh'); } - LOG('Centre', centre); // Translate each triangle this.translateMesh(centre.negate()); @@ -281,7 +280,7 @@ export class Mesh extends Warnable { } public sampleMaterial(materialName: string, uv: UV, textureFiltering: TextureFiltering) { - ASSERT(materialName in this._materials, 'Sampling material that does not exist'); + ASSERT(materialName in this._materials, `Sampling material that does not exist: ${materialName}`); const material = this._materials[materialName]; if (material.type === MaterialType.solid) { return material.colour; diff --git a/src/schematic.ts b/src/schematic.ts index e7d89ec..b8bf193 100644 --- a/src/schematic.ts +++ b/src/schematic.ts @@ -4,7 +4,7 @@ import path from 'path'; import { NBT, TagType, writeUncompressed } from 'prismarine-nbt'; import { Vector3 } from './vector'; import { BlockMesh } from './block_mesh'; -import { LOG, RESOURCES_DIR, Warnable } from './util'; +import { RESOURCES_DIR, Warnable } from './util'; export abstract class Exporter extends Warnable { protected _sizeVector!: Vector3; @@ -70,7 +70,7 @@ export class Schematic extends Exporter { if (unsupportedBlocks.size > 0) { this.addWarning(`${numBlocksUnsupported} blocks (${unsupportedBlocks.size} unique) are not supported by the .schematic format, Stone block are used in their place. Try using the schematic-friendly palette, or export using .litematica`); - LOG('Unsupported blocks', unsupportedBlocks); + // LOG('Unsupported blocks', unsupportedBlocks); } const nbt: NBT = {