1.18.2-pre1

This commit is contained in:
Misode
2022-02-18 22:54:00 +01:00
parent d0355b2342
commit 1812d5d2a6
8 changed files with 48 additions and 32 deletions

View File

@@ -25,6 +25,7 @@ export namespace Store {
if (version && VersionIds.includes(version as VersionId)) {
return version as VersionId
}
if (version === 'latest') return '1.18.2' // Upgrade path, remove in the future
return '1.18'
}

View File

@@ -262,9 +262,9 @@ export function Generator({}: Props) {
<BtnMenu icon="archive" label={locale('presets')} relative={false}>
<SearchList searchPlaceholder={locale('search')} noResults={locale('no_presets')} values={presets} onSelect={selectPreset}/>
</BtnMenu>
<BtnMenu icon="tag" label={locale(version)} tooltip={locale('switch_version')} data-cy="version-switcher">
<BtnMenu icon="tag" label={version} tooltip={locale('switch_version')} data-cy="version-switcher">
{allowedVersions.reverse().map(v =>
<Btn label={locale(v)} active={v === version} onClick={() => changeVersion(v)} />
<Btn label={v} active={v === version} onClick={() => changeVersion(v)} />
)}
</BtnMenu>
<BtnMenu icon="kebab_horizontal" tooltip={locale('more')}>

View File

@@ -12,7 +12,7 @@ import { CachedDecorator, CachedFeature } from '../services'
import { deepClone, deepEqual, 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', 'generator_structure.type']
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']
const hiddenFields = ['number_provider.type', 'score_provider.type', 'nbt_provider.type', 'int_provider.type', 'float_provider.type', 'height_provider.type']
const flattenedFields = ['feature.config', 'decorator.config', 'int_provider.value', 'float_provider.value', 'block_state_provider.simple_state_provider.state', 'block_state_provider.rotated_block_provider.state', 'block_state_provider.weighted_state_provider.entries.entry.data', 'rule_test.block_state', 'structure_feature.config', 'surface_builder.config', 'template_pool.elements.entry.element', 'decorator.block_survives_filter.state', 'material_rule.block.result_state']
const inlineFields = ['loot_entry.type', 'function.function', 'condition.condition', 'criterion.trigger', 'dimension.generator.type', 'dimension.generator.biome_source.type', 'feature.type', 'decorator.type', 'block_state_provider.type', 'feature.tree.minimum_size.type', 'trunk_placer.type', 'foliage_placer.type', 'tree_decorator.type', 'block_placer.type', 'rule_test.predicate_type', 'processor.processor_type', 'template_element.element_type', 'nbt_operation.op', 'number_provider.value', 'score_provider.name', 'score_provider.target', 'nbt_provider.source', 'nbt_provider.target', 'generator_biome.biome', 'block_predicate.type', 'material_rule.type', 'material_condition.type']

View File

@@ -4,12 +4,12 @@ import * as java15 from '@mcschema/java-1.15'
import * as java16 from '@mcschema/java-1.16'
import * as java17 from '@mcschema/java-1.17'
import * as java18 from '@mcschema/java-1.18'
import * as latest from '@mcschema/java-1.18.2'
import * as java182 from '@mcschema/java-1.18.2'
import config from '../../config.json'
import { message } from '../Utils'
import { fetchData } from './DataFetcher'
export const VersionIds = ['1.15', '1.16', '1.17', '1.18', 'latest'] as const
export const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2'] as const
export type VersionId = typeof VersionIds[number]
export type BlockStateRegistry = {
@@ -46,7 +46,7 @@ const versionGetter: {
1.16: java16,
1.17: java17,
1.18: java18,
latest: latest,
'1.18.2': java182,
}
export let CachedDecorator: INode<any>