File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -388,9 +388,17 @@ export async function parseBlockState(block: IParsedBlock): Promise<BlockModelMe
388388
389389 for ( const [ k , v ] of Object . entries ( block . states ) ) {
390390 if ( ! block . blockStateRegistryEntry . stateValues [ k ] ) {
391- throw new Error ( `Invalid block state '${ k } ' for '${ block . resource . name } ' ` )
391+ throw new Error (
392+ `Invalid block state '${ k } ' for '${ block . resource . name } '` +
393+ ` Expected one of: ${ Object . keys (
394+ block . blockStateRegistryEntry . stateValues
395+ ) . join ( ', ' ) } `
396+ )
392397 } else if ( ! block . blockStateRegistryEntry . stateValues [ k ] . includes ( v ) ) {
393- throw new Error ( `Invalid block state value '${ v . toString ( ) } ' for '${ k } '` )
398+ throw new Error (
399+ `Invalid block state value '${ v . toString ( ) } ' for '${ k } '.` +
400+ ` Expected one of: ${ block . blockStateRegistryEntry . stateValues [ k ] . join ( ', ' ) } `
401+ )
394402 }
395403 }
396404
You can’t perform that action at this time.
0 commit comments