This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const enum LootContext { | |
| BlockEntity, | |
| BlockState, | |
| DamageSource, | |
| DirectKillerEntity, | |
| ExplosionRadius, | |
| KillerEntity, | |
| LastDamagePlayer, | |
| Origin, | |
| ThisEntity, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Put `input.json` and `mapping.json` in the same directory as this script. | |
| const { promises: fs } = require('fs') | |
| const path = require('path'); | |
| (async () => { | |
| const result1 = {} | |
| const result2 = {} | |
| const input = JSON.parse(await fs.readFile(path.join(__dirname, 'input.json'), { encoding: 'utf-8' })) | |
| const mapping = JSON.parse(await fs.readFile(path.join(__dirname, 'mapping.json'), { encoding: 'utf-8' })) |