Fix world settings generator

This commit is contained in:
Misode
2024-10-27 05:15:26 +01:00
parent 3447a586c2
commit 88b8730b72
2 changed files with 15 additions and 0 deletions

View File

@@ -948,6 +948,7 @@ function getCategory(type: McdocType) {
if (type.kind === 'reference' && type.path) {
switch (type.path) {
case '::java::data::loot::LootPool':
case '::java::data::worldgen::dimension::Dimension':
case '::java::data::worldgen::surface_rule::SurfaceRule':
case '::java::data::worldgen::template_pool::WeightedElement':
return 'pool'

View File

@@ -22,7 +22,18 @@ import type { VersionId } from './Versions.js'
const builtinMcdoc = `
use ::java::server::util::text::Text
use ::java::data::worldgen::dimension::Dimension
dispatch minecraft:resource[text_component] to Text
dispatch minecraft:resource[world] to struct WorldSettings {
generate_features: boolean,
bonus_chest: boolean,
seed: #[random] int,
dimensions: struct {
[#[id="dimension"] string]: Dimension,
},
}
`
interface ClientDocument {
@@ -204,6 +215,9 @@ export class SpyglassService {
text_component: {
category: 'text_component',
},
world: {
category: 'world',
},
},
},
lint: {