Skip to content

Scraped vanilla data update#256

Merged
DaanV2 merged 3 commits intomainfrom
create-pull-request/patch
Mar 12, 2026
Merged

Scraped vanilla data update#256
DaanV2 merged 3 commits intomainfrom
create-pull-request/patch

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Automated changes by create-pull-request GitHub action

@github-actions github-actions bot force-pushed the create-pull-request/patch branch from fbe8104 to 974ac94 Compare March 1, 2026 12:56
@github-actions github-actions bot force-pushed the create-pull-request/patch branch from 974ac94 to 15d1ae0 Compare March 8, 2026 12:56
Comment on lines -3 to -7
export const PotionTypes: string[] = [
"Consume",
"ThrownLingering",
"ThrownSplash"
]; No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Can you ensure that there is a base file where we can define these values, so they aren't removed during scraping

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 8, 2026

@DaanV2 I've opened a new pull request, #271, to work on those changes. Once the pull request is ready, I'll request review from you.

… across scrapes (#271)

The scraper was overwriting `potion_types.ts` with an empty array on
each run because `General` had no base-loading mechanism — unlike BP/RP
containers which seed from `src/base/` before scraping.

## Changes

- **New base JSON files** in
`packages/bedrock-vanilla-data/src/base/general/`:
- `potion_types.json` — seeds the known values `["Consume",
"ThrownLingering", "ThrownSplash"]`
- `potion_modifiers.json` — empty placeholder following the same pattern

- **`General.load(folder)`** — new static method on the `General` class
that reads base values from JSON files before scraping populates the
rest

- **`Output.load()`** — updated to call
`General.load(baseFolder/general)` alongside the existing
`edu`/`vanilla` OutputSet loads

- **`loadStringArray(filepath)`** — new helper in `json.ts` for loading
plain string arrays; `loadEnsure<string>` silently wraps string items
into `{ id }` objects (by design for BP/RP data), which is incorrect for
simple string fields on `General`

The flow is now consistent with BP/RP containers: base values are loaded
first, scraped values are merged on top, and `cleanStrings()`
deduplicates before saving.

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/Blockception/minecraft-bedrock-language-server/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: DaanV2 <2393905+DaanV2@users.noreply.github.com>
@DaanV2 DaanV2 merged commit d0c9682 into main Mar 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants