Also show item display for block registry

This commit is contained in:
Misode
2024-10-26 22:46:15 +02:00
parent 2163020db8
commit e8871ee02a
2 changed files with 4 additions and 1 deletions

View File

@@ -129,7 +129,7 @@ function StringHead({ type, optional, node, makeEdit, ctx }: Props<StringType>)
}, [onChangeValue])
return <>
{(idRegistry === 'item' && value && !value.startsWith('#')) && <label>
{((idRegistry === 'item' || idRegistry === 'block') && value && !value.startsWith('#')) && <label>
<ItemDisplay item={new ItemStack(Identifier.parse(value), 1)} />
</label>}
{isSelect ? <>

View File

@@ -83,6 +83,9 @@ function getRootType(id: string): McdocType {
if (id === 'pack_mcmeta') {
return { kind: 'reference', path: '::java::pack::Pack' }
}
if (id === 'text_component' ) {
return { kind: 'reference', path: '::java::server::util::text::Text' }
}
if (id.startsWith('tag/')) {
const attribute: AttributeValue = {
kind: 'tree',