Improvements to transform + make source a textarea

This commit is contained in:
Misode
2020-05-28 01:28:19 +02:00
parent 9c20e9520a
commit 9189bbe229
10 changed files with 50 additions and 40 deletions

View File

@@ -17,7 +17,7 @@ export class ResourceNode extends EnumNode {
const options = mods?.options ?? [] // TODO: Support registry using `github.com/Arcensoth/mcdata`
super(options, {
transform: (v) => {
if (v === undefined) return undefined
if (v === undefined || v.length === 0) return undefined
return v.startsWith('minecraft:') ? v : 'minecraft:' + v
}, ...mods})
this.additional = mods?.additional ?? false