Skip to content

Commit e263ac6

Browse files
committed
Add 26.4 snapshot support + make 26.3 default
1 parent 84a849b commit e263ac6

6 files changed

Lines changed: 28 additions & 6 deletions

File tree

‎index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
gtag('config', 'G-S982VZS08T', {
1111
send_page_view: false,
1212
theme: localStorage.getItem('theme') || 'default',
13-
version: localStorage.getItem('schema_version') || '26.2',
13+
version: localStorage.getItem('schema_version') || '26.3',
1414
locale: localStorage.getItem('language') || 'en',
1515
prefers_color_scheme: matchMedia('(prefers-color-scheme: light)').matches ? 'light' : matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'none',
1616
tree_view_mode: localStorage.getItem('misode_tree_view_mode') || 'default',
@@ -29,7 +29,7 @@
2929
</script>
3030
<meta charset="utf-8">
3131
<meta name="viewport" content="width=device-width, initial-scale=1.0">
32-
<title>Data Pack Generators - Minecraft 1.21, 26.1, 26.2</title>
32+
<title>Data Pack Generators - Minecraft 26.1, 26.2, 26.3</title>
3333
<link rel="icon" href="/src/favicon-32.png" sizes="32x32">
3434
<script async src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
3535
<script>

‎src/app/contexts/Version.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface Version {
1515
changeTargetVersion: (version: VersionId, replace?: boolean) => unknown,
1616
}
1717
const Version = createContext<Version>({
18-
version: '1.18.2',
18+
version: '26.3',
1919
changeVersion: () => {},
2020
changeTargetVersion: () => {},
2121
})

‎src/app/services/Spyglass.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import type { VanillaMcdocSymbols, VersionMeta } from './DataFetcher.js'
1717
import { fetchBlockStates, fetchRegistries, fetchVanillaMcdoc, fetchVersions, getVersionChecksum } from './DataFetcher.js'
1818
import { IndexedDbFileSystem } from './FileSystem.js'
1919
import type { VersionId } from './Versions.js'
20+
import { checkVersion } from './Versions.js'
2021

2122
export const CACHE_URI = 'file:///cache/'
2223
export const ROOT_URI = 'file:///root/'
@@ -346,6 +347,9 @@ export class SpyglassService {
346347
block_transformer: {
347348
category: 'block_transformer',
348349
},
350+
block_sound_set: {
351+
category: 'block_sound_set',
352+
},
349353
'worldgen/carver' : {
350354
category: 'worldgen/carver',
351355
},
@@ -553,6 +557,11 @@ const McmetaSummaryUri = 'mcmeta://summary/registries.json'
553557

554558
function customSymbolRegistrar(summary: McmetaSummary, release: ReleaseVersion): core.SymbolRegistrar {
555559
return (symbols, ctx) => {
560+
if (checkVersion(release, '26.4')) {
561+
// Hacky fix until spyglass can be updated
562+
delete summary.fluids['flowing_lava']
563+
delete summary.fluids['flowing_water']
564+
}
556565
je.dependency.symbolRegistrar(summary, release)(symbols, ctx)
557566

558567
// Temporary until spyglass core is updated

‎src/app/services/Versions.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import config from '../Config.js'
22

3-
export const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2', '1.19', '1.19.3', '1.19.4', '1.20', '1.20.2', '1.20.3', '1.20.5', '1.21', '1.21.2', '1.21.4', '1.21.5', '1.21.6', '1.21.9', '1.21.11', '26.1', '26.2', '26.3'] as const
3+
export const VersionIds = ['1.15', '1.16', '1.17', '1.18', '1.18.2', '1.19', '1.19.3', '1.19.4', '1.20', '1.20.2', '1.20.3', '1.20.5', '1.21', '1.21.2', '1.21.4', '1.21.5', '1.21.6', '1.21.9', '1.21.11', '26.1', '26.2', '26.3', '26.4'] as const
44
export type VersionId = typeof VersionIds[number]
55

6-
export const DEFAULT_VERSION: VersionId = '26.2'
6+
export const DEFAULT_VERSION: VersionId = '26.3'
77

88
export function checkVersion(versionId: string, minVersionId: string | undefined, maxVersionId?: string) {
99
const version = config.versions.findIndex(v => v.id === versionId)

‎src/config.json‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,14 @@
227227
"id": "26.3",
228228
"ref": "26.3",
229229
"name": "26.3",
230-
"pack_format": 119,
230+
"pack_format": 121,
231+
"show": true
232+
},
233+
{
234+
"id": "26.4",
235+
"dynamic": true,
236+
"name": "26.4",
237+
"pack_format": 125,
231238
"show": true
232239
}
233240
],
@@ -473,6 +480,11 @@
473480
"url": "block-transformer",
474481
"minVersion": "26.3"
475482
},
483+
{
484+
"id": "block_sound_set",
485+
"url": "block-sound-set",
486+
"minVersion": "26.4"
487+
},
476488
{
477489
"id": "text_component",
478490
"url": "text-component",

‎src/locales/en.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
"generator.banner_pattern": "Banner Pattern",
6969
"generator.block_definition": "Blockstate",
7070
"generator.block_transformer": "Block Transformer",
71+
"generator.block_sound_set": "Block Sound Set",
7172
"generator.browse_available": "Browse available generators for %0%",
7273
"generator.cat_sound_variant": "Cat Sound Variant",
7374
"generator.cat_variant": "Cat Variant",

0 commit comments

Comments
 (0)