inspect in debugger sources

This commit is contained in:
2026-07-18 23:54:12 -04:00
parent a0b28c4aaf
commit 9011ef2271
2 changed files with 7 additions and 2 deletions

View File

@@ -27,6 +27,10 @@
p stone
p stone
p stone
p stone_bricks
p deepslate axis=z
</script>
</mc-diorama>

View File

@@ -157,14 +157,15 @@ export class BlockstateResolver {
if (!this.pending.has(id)) {
const [space, name] = id.split(':');
const url = `assets/${space}/blockstates/${name}.json`;
this.pending.set(id, fetch(`assets/${space}/blockstates/${name}.json`)
this.pending.set(id, fetch(url)
.then(res => res.json())
.then(data => {
const source = renderBlockstateResolver(data);
/** @type {ResolverFunction} */
const resolver = new Function(`return function (state, hash) { ${source} }`)();
const resolver = new Function(`return function (state, hash) { ${source} } //# sourceURL=${url}`)();
this.resolvers.set(id, resolver);
this.pending.delete(id);