Skip to content

Commit

Permalink
add 24w40a winter drop
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobsjo committed Oct 2, 2024
1 parent b201a63 commit 9feb7d1
Show file tree
Hide file tree
Showing 7 changed files with 42,786 additions and 16 deletions.
2 changes: 2 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"settings.mc_version.mc1_20_4": "Minecraft 1.20.4",
"settings.mc_version.mc1_20_6": "Minecraft 1.20.6",
"settings.mc_version.mc1_21": "Minecraft 1.21",
"settings.mc_version.mc1_21_2": "Minecraft 1.21.2",
"settings.dev_mode.label": "Developer Mode:",
"settings.dev_mode.aria-label": "Developer Mode",
"settings.world_preset.label": "World Preset:",
Expand Down Expand Up @@ -67,6 +68,7 @@
"dropdown.add.folder": "Open Folder",
"dropdown.add.built_in.update_1_20": "Update 1.20",
"dropdown.add.built_in.update_1_21": "Update 1.21",
"dropdown.add.built_in.winter_drop": "Winter Drop",
"dropdown.add.built_in.title": "Built-in Datapacks",
"dropdown.add.recents.title": "Recently used",
"dropdown.add.recents.not_found": "Pack not Found. Removing from recently used list.",
Expand Down
6 changes: 4 additions & 2 deletions scripts/createVanillaZips.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,15 @@
REQUIRED_PATHS = [
"pack.mcmeta",
"data/minecraft/datapacks/update_1_20/pack.mcmeta",
"data/minecraft/datapacks/update_1_21/pack.mcmeta"
"data/minecraft/datapacks/update_1_21/pack.mcmeta",
"data/minecraft/datapacks/winter_drop/pack.mcmeta"
]

for path in REQUIRED_DATA_TYPES:
REQUIRED_PATHS.append(f'data/minecraft/{path}')
REQUIRED_PATHS.append(f'data/minecraft/datapacks/update_1_20/data/minecraft/{path}')
REQUIRED_PATHS.append(f'data/minecraft/datapacks/update_1_21/data/minecraft/{path}')
REQUIRED_PATHS.append(f'data/minecraft/datapacks/winter_drop/data/minecraft/{path}')

for path in REQUIRED_ASSETS_TYPES:
REQUIRED_PATHS.append("assets/minecraft/" + path)
Expand Down Expand Up @@ -120,4 +122,4 @@ def emptyTmp():
main('tags/1.20.4-', "update_1_21", "_1_20_4")
main('tags/1.20.6-', "update_1_21", "_1_20_6")
main('tags/1.21-', "", "_1_21")
# main('heads/', "", "_1_21_next")
main('heads/', "winter_drop", "_1_21_2")
42,757 changes: 42,755 additions & 2 deletions src/BuildIn/MultiNoiseBiomeParameterList.ts

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions src/components/SettingsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Identifier, XoroshiroRandom } from 'deepslate';
import { ref } from 'vue';
import { useDatapackStore } from '../stores/useDatapackStore';
import { useSettingsStore } from '../stores/useSettingsStore';
import { versionMetadata } from '../util'
const MAX_LONG = BigInt("0x8000000000000000") // 2^63
Expand Down Expand Up @@ -47,12 +48,7 @@ function parseSeed(input: string): bigint {
<div class="setting">
<div class="title">{{ $t('settings.mc_version.label') }}</div>
<select :aria-label=" $t('settings.mc_version.aria-label')" v-model="settingsStore.mc_version">
<option :value="'1_19'">{{ $t('settings.mc_version.mc1_19') }}</option>
<option :value="'1_20'">{{ $t('settings.mc_version.mc1_20') }}</option>
<option :value="'1_20_2'">{{ $t('settings.mc_version.mc1_20_2') }}</option>
<option :value="'1_20_4'">{{ $t('settings.mc_version.mc1_20_4') }}</option>
<option :value="'1_20_6'">{{ $t('settings.mc_version.mc1_20_6') }}</option>
<option :value="'1_21'">{{ $t('settings.mc_version.mc1_21') }}</option>
<option v-for="version in Object.keys(versionMetadata)" :value="version">{{ $t(`settings.mc_version.mc${version}`)}}</option>
</select>
</div>

Expand Down
15 changes: 9 additions & 6 deletions src/components/dropdown/OpenDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { useSettingsStore } from '../../stores/useSettingsStore';
import { versionMetadata } from '../../util';
import { EventTracker } from '../../util/EventTracker';
type Preset = {id: string, image: string, message_key: string, url: string }
const i18n = useI18n()
const settingsStore = useSettingsStore()
Expand Down Expand Up @@ -47,8 +49,9 @@ async function loadHandle(handle: FileSystemHandle) {
emit('close')
}
async function loadUrl(url: string) {
const datapack = Datapack.fromZipUrl(url, versionMetadata[settingsStore.mc_version].datapackFormat)
async function loadPreset(preset: Preset) {
EventTracker.track(`add_datapack/built_in/${preset.id}`)
const datapack = Datapack.fromZipUrl(preset.url, versionMetadata[settingsStore.mc_version].datapackFormat)
datapackStore.addDatapack(datapack)
emit('close')
}
Expand Down Expand Up @@ -142,9 +145,9 @@ async function loadFolder(event: MouseEvent) {
}
const PRESET_DATAPACKS = computed(() => {
const presets: {image: string, message_key: string, url: string }[] = []
const presets: Preset[] = []
versionMetadata[settingsStore.mc_version].experimentalDatapacks.forEach(ed => {
presets.push({ image: UNKOWN_PACK, message_key: ed.translation_key, url: `vanilla_datapacks/vanilla_${ed.url}`})
presets.push({id: ed.url, image: UNKOWN_PACK, message_key: ed.translation_key, url: `vanilla_datapacks/vanilla_${ed.url}.zip`})
})
return presets
Expand All @@ -160,8 +163,8 @@ const PRESET_DATAPACKS = computed(() => {
$t('dropdown.add.folder') }} </DropdownEntry>
<div class="spacer" v-if="PRESET_DATAPACKS.length > 0"></div>
<div class="title" v-if="PRESET_DATAPACKS.length > 0">{{ $t('dropdown.add.built_in.title') }} </div>
<DropdownEntry v-for="preset in PRESET_DATAPACKS" :image="preset.image" @click="loadUrl(preset.url);"
@keypress.enter="loadUrl(preset.url)">{{ $t(preset.message_key) }}</DropdownEntry>
<DropdownEntry v-for="preset in PRESET_DATAPACKS" :image="preset.image" @click="loadPreset(preset);"
@keypress.enter="loadPreset(preset)">{{ $t(preset.message_key) }}</DropdownEntry>
<div class="spacer"></div>
<div class="title">{{ $t('dropdown.add.recents.title') }}</div>
<div class="enable" v-if="recentStore.avalible && !recentStore.enabled" @click="recentStore.enable()"
Expand Down
13 changes: 13 additions & 0 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,17 @@ export const versionMetadata: { [version: string]: Metadata } = {
structure: ResourceLocation.STRUCTURE
}
},
"1_21_2": {
vanillaDatapack: "1_21_2",
experimentalDatapacks: [
{
"url": "1_21_2_winter_drop",
"translation_key": "dropdown.add.built_in.winter_drop"
}
],
datapackFormat: 56,
resourceLocations: {
structure: ResourceLocation.STRUCTURE
}
},
}
1 change: 1 addition & 0 deletions vanilla_datapack_base/data/c/worldgen/biome_colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"minecraft:mangrove_swamp": { "r": 39, "g": 84, "b": 66 },
"minecraft:deep_dark": { "r": 8, "g": 39, "b": 31 },
"minecraft:cherry_grove": { "r": 220, "g": 138, "b": 221},
"minecraft:pale_garden": { "r": 144, "g": 144, "b": 144},
"minecraft:soul_sand_valley": { "r": 140, "g": 132, "b": 108 },
"minecraft:nether_wastes": { "r": 163, "g": 62, "b": 62 },
"minecraft:crimson_forest": { "r": 219, "g": 60, "b": 46 },
Expand Down

0 comments on commit 9feb7d1

Please sign in to comment.