diff --git a/src/app/components/Octicon.tsx b/src/app/components/Octicon.tsx
index 97dcf1e1..9404a34c 100644
--- a/src/app/components/Octicon.tsx
+++ b/src/app/components/Octicon.tsx
@@ -28,6 +28,7 @@ export const Octicon = {
link_external: ,
mark_github: ,
moon: ,
+ package: ,
play: ,
plus: ,
plus_circle: ,
diff --git a/src/app/schema/renderHtml.tsx b/src/app/schema/renderHtml.tsx
index a6a98c6e..999fc2b6 100644
--- a/src/app/schema/renderHtml.tsx
+++ b/src/app/schema/renderHtml.tsx
@@ -9,7 +9,7 @@ import { localize, useStore } from '../contexts'
import { useFocus } from '../hooks'
import { VanillaColors } from '../previews'
import type { BlockStateRegistry, VersionId } from '../services'
-import { CachedDecorator, CachedFeature } from '../services'
+import { CachedCollections, CachedDecorator, CachedFeature, getTextureUrl } from '../services'
import { deepClone, deepEqual, generateUUID, hexId, hexToRgb, isObject, newSeed, rgbToHex, stringToColor } from '../Utils'
import { ModelWrapper } from './ModelWrapper'
@@ -22,6 +22,8 @@ const fixedLists = ['generator_biome.parameters.temperature', 'generator_biome.p
const collapsedFields = ['noise_settings.surface_rule', 'noise_settings.noise.terrain_shaper']
const collapsableFields = ['density_function.argument', 'density_function.argument1', 'density_function.argument2', 'density_function.input', 'density_function.when_in_range', 'density_function.when_out_of_range']
+const PACKAGE = ''
+
const findGenerator = (id: string) => {
return config.generators.find(g => g.id === id.replace(/^\$/, ''))
}
@@ -134,11 +136,24 @@ const renderHtml: RenderHook = {
const cPath = path.push(index).contextPush('entry')
const canToggle = children.type(cPath) === 'object'
const toggle = isToggled(cId)
+
+ let label: undefined | string | JSX.Element
+ if (['loot_pool.entries.entry', 'loot_entry.alternatives.children.entry', 'loot_entry.group.children.entry', 'loot_entry.sequence.children.entry', 'function.set_contents.entries.entry'].includes(cPath.getContext().join('.'))) {
+ if (isObject(cValue) && typeof cValue.type === 'string' && cValue.type.replace(/^minecraft:/, '') === 'item' && typeof cValue.name === 'string') {
+ const texturePath = `item/${cValue.name.replace(/^minecraft:/, '')}`
+ if (CachedCollections.get('texture').includes('minecraft:' + texturePath)) {
+ label = e.currentTarget.outerHTML = PACKAGE} />
+ } else {
+ label = Octicon.package
+ }
+ }
+ }
+
if (canToggle && (toggle === false || (toggle === undefined && value.length > 20))) {
return