inspect in debugger sources
This commit is contained in:
@@ -27,6 +27,10 @@
|
||||
p stone
|
||||
p stone
|
||||
p stone
|
||||
|
||||
p stone_bricks
|
||||
|
||||
p deepslate axis=z
|
||||
</script>
|
||||
</mc-diorama>
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user