UNPKG

bc-minecraft-bedrock-project

Version:

The typescript library responsible for reading/parsing minecraft bedrock data

24 lines 726 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Process = Process; const bc_minecraft_bedrock_types_1 = require("bc-minecraft-bedrock-types"); const types_1 = require("../../../types"); /** * * @param doc * @returns */ function Process(doc) { const uri = doc.uri; const index = uri.indexOf("loot_tables"); if (index < 0) return undefined; const id = uri.substring(index, uri.length).replace(/\\/g, "/"); const out = { id: id, location: bc_minecraft_bedrock_types_1.Types.Location.create(uri, 0), documentation: types_1.Documentation.getDoc(doc, () => `Loot table: ${id}`), }; return out; } //# sourceMappingURL=process.js.map