Skip to content

Instantly share code, notes, and snippets.

@SPGoding
SPGoding / Loot Context.ts
Last active August 5, 2020 22:43
Some nasty loot context stuff written in TypeScript in case someone wants it
const enum LootContext {
BlockEntity,
BlockState,
DamageSource,
DirectKillerEntity,
ExplosionRadius,
KillerEntity,
LastDamagePlayer,
Origin,
ThisEntity,
@SPGoding
SPGoding / map.js
Last active July 21, 2020 01:02
Map locale keys from the legacy Misode generator to the new Misode generator. What is Misode generator? It's a generator used to generate Misodes
// 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' }))

Keybase proof

I hereby claim:

  • I am spgoding on github.
  • I am spgoding (https://keybase.io/spgoding) on keybase.
  • I have a public key ASDvFP-tZc-fBsfA7OdZQZ54PzP7Qgg55lYuPFT7BrAgKgo

To claim this, I am signing this object: