bc-minecraft-bedrock-project
Version:
The typescript library responsible for reading/parsing minecraft bedrock data
23 lines • 702 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.process = process;
const bc_minecraft_bedrock_shared_1 = require("bc-minecraft-bedrock-shared");
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, '/');
return {
id: id,
location: bc_minecraft_bedrock_shared_1.Location.create(uri, 0),
documentation: types_1.Documentation.getDoc(doc, () => `Loot table: ${id}`),
};
}
//# sourceMappingURL=process.js.map