diff --git a/src/app/Utils.ts b/src/app/Utils.ts
index d7223ca9..dd8e9759 100644
--- a/src/app/Utils.ts
+++ b/src/app/Utils.ts
@@ -25,6 +25,14 @@ export function randomSeed() {
return BigInt(Math.floor(Math.random() * Number.MAX_SAFE_INTEGER))
}
+export function generateUUID() {
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
+ const r = Math.random()*16|0
+ const v = c == 'x' ? r : (r&0x3|0x8)
+ return v.toString(16)
+ })
+}
+
export function newSeed(model: DataModel) {
const seed = Math.floor(Math.random() * (4294967296)) - 2147483648
const dimensions = model.get(new Path(['dimensions']))
diff --git a/src/app/schema/renderHtml.tsx b/src/app/schema/renderHtml.tsx
index c34093ff..ba474c32 100644
--- a/src/app/schema/renderHtml.tsx
+++ b/src/app/schema/renderHtml.tsx
@@ -9,7 +9,7 @@ import { localize } from '../contexts'
import { useFocus } from '../hooks'
import type { BlockStateRegistry, VersionId } from '../services'
import { CachedDecorator, CachedFeature } from '../services'
-import { deepClone, deepEqual, hexId, isObject, newSeed } from '../Utils'
+import { deepClone, deepEqual, generateUUID, hexId, isObject, newSeed } from '../Utils'
import { ModelWrapper } from './ModelWrapper'
const selectRegistries = ['loot_table.type', 'loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'recipe.type', 'dimension.generator.type', 'dimension.generator.biome_source.type', 'dimension.generator.biome_source.preset', 'carver.type', 'feature.type', 'decorator.type', 'feature.tree.minimum_size.type', 'block_state_provider.type', 'trunk_placer.type', 'foliage_placer.type', 'tree_decorator.type', 'int_provider.type', 'float_provider.type', 'height_provider.type', 'structure_feature.type', 'surface_builder.type', 'processor.processor_type', 'rule_test.predicate_type', 'pos_rule_test.predicate_type', 'template_element.element_type', 'block_placer.type', 'block_predicate.type', 'material_rule.type', 'material_condition.type', 'structure_placement.type', 'density_function.type', 'root_placer.type', 'entity.type_specific.cat.variant', 'entity.type_specific.frog.variant']
@@ -424,6 +424,7 @@ function StringSuffix({ path, getValues, config, node, value, lang, version, sta
{values.length > 0 && }
+ {['attribute_modifier.id', 'text_component_object.hoverEvent.show_entity.contents.id'].includes(path.getContext().join('.')) && }
{gen && values.includes(value) && value.startsWith('minecraft:') &&
{Octicon.link_external}}
>
diff --git a/src/locales/en.json b/src/locales/en.json
index 91ae5355..38a372a5 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -34,6 +34,7 @@
"format.yaml": "YAML",
"fields": "Fields",
"generate_new_seed": "Generate new seed",
+ "generate_new_uuid": "Generate new UUID",
"github": "GitHub",
"guides.all": "All guides",
"guides.search": "Search guides",