Skip to content

update(files): graves - #985

Open
drav0011 wants to merge 12 commits into
develfrom
update/graves_bedrock_core
Open

update(files): graves#985
drav0011 wants to merge 12 commits into
develfrom
update/graves_bedrock_core

Conversation

@drav0011

Copy link
Copy Markdown
Member

Graves but with extra bs

Removed old addon template now there is addon scaffolding tooling based on @bedrock-core in root package.json adjusted for BT

By checking the following boxes with an X, you ensure that:

  • The pack was tested ingame in at least one device.

  • The pack is an existing BT pack, is a missing pack from VT or is an accepted pack/change in a discussion.

  • The pack code follows the style guide.

  • The commits follow the contribution guidelines.

  • The PR follows the contribution guidelines.

  • (Optional) Tested in Windows

  • (Optional) Tested in Android

  • (Optional) Tested in iOS

  • (Optional) Tested in any console

  • (Optional) Tested in BDS

- Deleted all graves scripts, including event handling, dynamic properties, UI and utility functions
- Removed the associated resources: entity definitions, textures and language files
- Cleaned up the project structure by dropping the unused directories and files
- Added `yarn create-addon` (tools/create-addon.mjs), a wrapper around the bedrock-core CLI which scaffolds addons into addons/files/<category>/<addon_name>/ with the BT conventions (creator `bt`, `bt_<category_initials>_<addon_name>` namespace, author credit, private `@bedrock-tweaks/<addon_name>` workspace package, category workspace registration)
- Removed the legacy templates/addon boilerplate, replaced by templates/addon.md pointing to the scaffolder
- Rebuilt the addon on the bedrock-core stack (creator `bt`, namespace `bt_gc_graves`) with a typed RPC layer and custom server UI
- Graves keep inventory, armor, offhand and XP: interact to open like a chest, sneak + interact to restore items to their original slots, hit twice to scatter them
- Graves are fireproof, explosion proof, float on lava and are rescued from the void
- Only the owner can open a grave unless grave robbing is enabled or the opener holds a grave key
- Added `/bt_gc_graves:graves`, `:config`, `:guide`, `:gravekey` and `:gravesadmin` commands with an in-game guide and admin panel
- Registered the pack in addons/packs.json without a version: addon versions and the minimum engine version now come from the pack manifest
- Documented the `yarn create-addon` scaffolder in place of the removed addon template and its key replacement list
- Fixed the watch command (`yarn run watch`) and clarified that versions are bumped in the addon package.json and BP/RP manifests, not in addons/packs.json
- Updated the packs.json interfaces: addons no longer carry a pack version or a root version, both are added by the server from the pack manifests
- Dropped the JSON UI restriction for addons and refreshed the technical details to prefer custom commands and UI
- Rebuilt the grave model as a stone brick wall with east/west connections and a raised centre post, using the vanilla stone brick texture
- Reworked the grave list, admin panel and detail screens onto the bedrock-core screen shell: card parent, fixed header and a scroll region below it, with the detail actions pinned under the scroll
- Added a settings gear to the list and admin headers which opens the addon config through the shared bedrock-core UI
- Replaced the grave shake with a damped spring around the vertical axis, driven by an animation controller so every hit restarts it
- Updated the addon to @bedrock-core/ui 0.11.0 and its core UI pack dependency
- Corrected the bedrock-core addon list credit format in the create-addon description
Copilot AI lite review requested due to automatic review settings August 20, 2026 08:22

Copilot AI left a comment

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.

Pull request overview

This PR migrates addon scaffolding and the existing Graves addon to the bedrock-core stack, replacing the legacy in-repo addon template with a root-level scaffolding tool and updating repo docs/metadata accordingly.

Changes:

  • Added a root yarn create-addon wrapper to scaffold new addons into addons/files/... using @bedrock-core/cli, with Bedrock Tweaks conventions applied.
  • Removed the legacy templates/addon/ template content and updated CONTRIBUTING guidance around addon creation/versioning.
  • Refactored the Graves addon substantially (bedrock-core UI/config/guide integration, new entity/item definitions, new index/purge/rpc/placement/capture logic, updated pack manifests/assets).

Reviewed changes

Copilot reviewed 124 out of 128 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tools/create-addon.mjs New Bedrock Tweaks wrapper around @bedrock-core/cli for addon scaffolding.
package.json Adds create-addon script entry.
templates/addon.md New docs pointer for addon scaffolding via yarn create-addon.
CONTRIBUTING.md Updates addon creation workflow, watch command naming, and addon versioning guidance.
addons/packs.json Adjusts addon catalog metadata (removes section version, updates Graves description).
templates/addon/tsconfig.json Removed legacy addon template file.
templates/addon/packs/RP/texts/languages.json Removed legacy addon template file.
templates/addon/packs/RP/texts/en_US.lang Removed legacy addon template file.
templates/addon/packs/RP/texts/en_GB.lang Removed legacy addon template file.
templates/addon/packs/RP/manifest.json Removed legacy addon template file.
templates/addon/packs/data/.gitkeep Removed legacy addon template file.
templates/addon/packs/BP/texts/languages.json Removed legacy addon template file.
templates/addon/packs/BP/texts/en_US.lang Removed legacy addon template file.
templates/addon/packs/BP/texts/en_GB.lang Removed legacy addon template file.
templates/addon/packs/BP/scripts/Util/Scoreboard.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Util/index.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Util/DynamicProperties.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/UI/index.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/UI/Example.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Models/index.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Models/EntityTypes.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/main.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Events/index.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Events/EntityDie.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Actions/Uninstall.ts Removed legacy addon template file.
templates/addon/packs/BP/scripts/Actions/index.ts Removed legacy addon template file.
templates/addon/packs/BP/manifest.json Removed legacy addon template file.
templates/addon/package.json Removed legacy addon template file.
templates/addon/filters/.gitkeep Removed legacy addon template file.
templates/addon/eslint.config.mjs Removed legacy addon template file.
templates/addon/config.json Removed legacy addon template file.
templates/addon/.vscode/settings.json Removed legacy addon template file.
templates/addon/.vscode/launch.json Removed legacy addon template file.
templates/addon/.vscode/extensions.json Removed legacy addon template file.
templates/addon/.gitignore Removed legacy addon template file.
addons/files/gameplay_changes/graves/tsconfig.json Updates TS config for bedrock-core UI/JSX + generated modules and broader includes.
addons/files/gameplay_changes/graves/README.md New addon readme (commands, dev workflow, design notes).
addons/files/gameplay_changes/graves/packs/RP/textures/ui/icon.png Adds addon UI icon (LFS).
addons/files/gameplay_changes/graves/packs/RP/textures/item_texture.json Renames RP atlas ids to match updated namespace/id scheme.
addons/files/gameplay_changes/graves/packs/RP/textures/entity/grave.png Updates grave texture asset (LFS).
addons/files/gameplay_changes/graves/packs/RP/texts/languages.json Adds RP languages list (en_US).
addons/files/gameplay_changes/graves/packs/RP/texts/en_US.lang Adjusts RP lang content to i18n-filter-generated approach.
addons/files/gameplay_changes/graves/packs/RP/render_controllers/grave.rc.json New render controller for grave client entity.
addons/files/gameplay_changes/graves/packs/RP/models/entity/grave.geo.json Updates grave geometry/UVs/bounds.
addons/files/gameplay_changes/graves/packs/RP/manifest.json Updates RP manifest (localized name/desc keys, uuids, min engine, authors).
addons/files/gameplay_changes/graves/packs/RP/entity/grave.entity.json Updates client entity id, adds animations/controllers, updates render controller.
addons/files/gameplay_changes/graves/packs/RP/animations/grave.animation.json New shake animation definition.
addons/files/gameplay_changes/graves/packs/RP/animation_controllers/grave.ac.json New shake animation controller.
addons/files/gameplay_changes/graves/packs/data/i18n/es_ES.ts New Spanish locale file for bedrock-core i18n.
addons/files/gameplay_changes/graves/packs/data/i18n/en_US.ts New default locale file + config schema labels/descriptions.
addons/files/gameplay_changes/graves/packs/data/guides/en_US/server-settings.mdx New in-game guide page (server settings).
addons/files/gameplay_changes/graves/packs/data/guides/en_US/intro.mdx New in-game guide page (intro).
addons/files/gameplay_changes/graves/packs/data/guides/en_US/configuration.mdx New in-game guide page (player settings).
addons/files/gameplay_changes/graves/packs/data/guides/en_US/admin.mdx New in-game guide page (operator/admin + RPC notes).
addons/files/gameplay_changes/graves/packs/data/.gitkeep Removes legacy placeholder file.
addons/files/gameplay_changes/graves/packs/BP/texts/languages.json Adds BP languages list (en_US).
addons/files/gameplay_changes/graves/packs/BP/texts/en_US.lang Adds BP lang note for i18n-filter-generated meta keys.
addons/files/gameplay_changes/graves/packs/BP/scripts/Util/Scoreboard.ts Removes legacy util module from Graves.
addons/files/gameplay_changes/graves/packs/BP/scripts/Util/index.ts Removes legacy util barrel from Graves.
addons/files/gameplay_changes/graves/packs/BP/scripts/Util/DynamicProperties.ts Removes legacy util module from Graves.
addons/files/gameplay_changes/graves/packs/BP/scripts/util.ts New shared helpers (dimension names, time formatting, cause text, etc.).
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/SettingsButton.tsx New UI settings button integrating with shared bedrock-core config UI.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/Settings.ts Removes legacy modal-form settings UI.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/index.ts Removes legacy UI exports.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/i18n.ts New typed i18n instance wiring for bedrock-core UI.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/GravesApp.tsx New navigation stack/root render entry for Graves UI.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/GraveList.tsx New graves list screen UI.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/GraveDetail.tsx New grave detail screen UI (admin actions included).
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/Config.ts Removes legacy config menu UI.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/AdminPanel.tsx New admin panel UI listing all graves via index.
addons/files/gameplay_changes/graves/packs/BP/scripts/types.ts New shared types (index record, RPC surface, placement).
addons/files/gameplay_changes/graves/packs/BP/scripts/rpc.ts New typed RPC surface for cross-addon integration.
addons/files/gameplay_changes/graves/packs/BP/scripts/registration.ts New bedrock-core core.register wiring (config/i18n/guides/icon).
addons/files/gameplay_changes/graves/packs/BP/scripts/open/restore.ts New “sneak + interact” restore-to-inventory implementation.
addons/files/gameplay_changes/graves/packs/BP/scripts/open/gate.ts New before-event interact gate for authorization + open behavior.
addons/files/gameplay_changes/graves/packs/BP/scripts/open/container.ts New container watch/poll logic for native container open path.
addons/files/gameplay_changes/graves/packs/BP/scripts/open/auth.ts New authorization/key consumption logic for graves.
addons/files/gameplay_changes/graves/packs/BP/scripts/open/attack.ts New “hit twice to scatter” behavior with shake window.
addons/files/gameplay_changes/graves/packs/BP/scripts/Models/ScriptEvents.ts Removes legacy script-event enum.
addons/files/gameplay_changes/graves/packs/BP/scripts/Models/ItemTypes.ts Removes legacy item-id enum.
addons/files/gameplay_changes/graves/packs/BP/scripts/Models/index.ts Removes legacy models barrel.
addons/files/gameplay_changes/graves/packs/BP/scripts/Models/EntityTypes.ts Removes legacy entity-id enum.
addons/files/gameplay_changes/graves/packs/BP/scripts/Models/DynamicProperties.ts Removes legacy dynamic-properties model definitions.
addons/files/gameplay_changes/graves/packs/BP/scripts/main.ts Replaces legacy tick/event wiring with bedrock-core UI + new init pipeline.
addons/files/gameplay_changes/graves/packs/BP/scripts/lifecycle.ts New centralized grave entity plumbing (container/xp/removal helpers).
addons/files/gameplay_changes/graves/packs/BP/scripts/index/store.ts New index storage in world dynamic properties (+ core.state summary).
addons/files/gameplay_changes/graves/packs/BP/scripts/index/reconcile.ts New reconciliation logic on entity load (orphans/tombstones/drift).
addons/files/gameplay_changes/graves/packs/BP/scripts/index/purge.ts New purge + force-purge ticking-area implementation.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/WorldInitialize.ts Removes legacy event wiring.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/ScriptEventReceive.ts Removes legacy script-event based command wiring.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/PlayerInteractWithEntity.ts Removes legacy interact behavior.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/index.ts Removes legacy event barrel.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/GameRuleChange.ts Removes legacy gamerule change handling.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/EntityHit.ts Removes legacy hit handling.
addons/files/gameplay_changes/graves/packs/BP/scripts/Events/EntityDie.ts Removes legacy death handling.
addons/files/gameplay_changes/graves/packs/BP/scripts/despawn.ts New time-based despawn sweep (epoch ms from index).
addons/files/gameplay_changes/graves/packs/BP/scripts/death/spawn.ts New grave spawn logic (container fill + indexing + name tag policy).
addons/files/gameplay_changes/graves/packs/BP/scripts/death/placement.ts New placement solver using raycasts + void/lava/protection rules.
addons/files/gameplay_changes/graves/packs/BP/scripts/death/keepInventory.ts New keepInventory ownership/enforcement + enable/disable hooks.
addons/files/gameplay_changes/graves/packs/BP/scripts/death/impenetrable.ts New multi-layer “impenetrable” policy (tag/config/RPC/vanilla).
addons/files/gameplay_changes/graves/packs/BP/scripts/death/capture.ts New death capture pipeline (snapshot → grave → clear inventory/equipment).
addons/files/gameplay_changes/graves/packs/BP/scripts/constants.ts New shared ids/constants (namespace, props, sizes, tags, repellers).
addons/files/gameplay_changes/graves/packs/BP/scripts/config.ts New bedrock-core config schema definitions.
addons/files/gameplay_changes/graves/packs/BP/scripts/commands.ts New custom commands (graves, gravekey, gravesadmin).
addons/files/gameplay_changes/graves/packs/BP/scripts/Actions/uninstall.ts Removes legacy uninstall action.
addons/files/gameplay_changes/graves/packs/BP/scripts/Actions/settings.ts Removes legacy settings storage/actions.
addons/files/gameplay_changes/graves/packs/BP/scripts/Actions/listGraves.ts Removes legacy chat-based listing.
addons/files/gameplay_changes/graves/packs/BP/scripts/Actions/index.ts Removes legacy actions barrel.
addons/files/gameplay_changes/graves/packs/BP/scripts/Actions/Grave.ts Removes legacy monolithic grave implementation.
addons/files/gameplay_changes/graves/packs/BP/scripts/Actions/giveGraveKey.ts Removes legacy grave key handout action.
addons/files/gameplay_changes/graves/packs/BP/manifest.json Updates BP manifest (localized name/desc keys, uuids, deps, module versions).
addons/files/gameplay_changes/graves/packs/BP/items/grave_key.json Replaces legacy JSON item definition.
addons/files/gameplay_changes/graves/packs/BP/items/grave_key.item.ts New TS-driven item definition for generator filter.
addons/files/gameplay_changes/graves/packs/BP/functions/graves/uninstall.mcfunction Removes legacy script-event function.
addons/files/gameplay_changes/graves/packs/BP/functions/graves/config.mcfunction Removes legacy script-event function.
addons/files/gameplay_changes/graves/packs/BP/entities/grave.json Replaces legacy JSON entity definition.
addons/files/gameplay_changes/graves/packs/BP/entities/grave.entity.ts New TS-driven entity definition for generator filter.
addons/files/gameplay_changes/graves/package.json Updates addon package deps/scripts for bedrock-core + watch command.
addons/files/gameplay_changes/graves/config.json Updates regolith pipeline (generator/guides/i18n/bundler) and metadata.
addons/files/gameplay_changes/graves/.vscode/settings.json Updates addon-local VSCode settings.
addons/files/gameplay_changes/graves/.vscode/launch.json Updates debugger paths/uuid and schema version.
addons/files/gameplay_changes/graves/.vscode/extensions.json Updates recommended extensions list.
addons/files/gameplay_changes/graves/.mcignore Adds mcpack ignore patterns.
addons/files/gameplay_changes/graves/.gitignore Expands ignore rules and filter/artifact ignores.
.gitignore Ignores additional vt-diff tool output/cache directories.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread tools/create-addon.mjs
Comment thread tools/create-addon.mjs Outdated
Comment thread addons/files/gameplay_changes/graves/packs/BP/scripts/open/gate.ts
Comment thread addons/files/gameplay_changes/graves/.vscode/settings.json
Comment thread addons/files/gameplay_changes/graves/.gitignore Outdated
@drav0011 drav0011 changed the title Update/graves bedrock core update(files): graves Aug 20, 2026
@drav0011 drav0011 added addons Indicates the issue is related to Addons update updating a feature that is missing confirmed Something that is confirmed and needs to be done and removed update updating a feature that is missing labels Aug 20, 2026
- Added a locator bar for graves: each grave becomes a waypoint on its owner's bar with a custom grave icon, so nobody has to read coordinates out of chat
- Waypoints are owner only and cannot be turned on for anyone else's graves, with a server switch for operators and a per player switch for everyone
- Added a per grave checkbox in the grave list so a single grave can be taken off the bar without hiding the rest
- Removed the close button from the grave detail screen, the header already carries back and close
- Guarded the native container open path against a disconnected player, matching the sneak path
- Updated the Minecraft modules to the latest stable: server 2.9.0, common 1.3.0, vanilla data 1.26.44, minimum engine version 1.26.40
- Fixed the addon gitignore not matching nested regolith directories and added an editorconfig for the addon formatting
- Fixed a bare --author silently falling back to the git name and consuming the next argument, which turned the addon name into the description
- Fixed the category initials producing "undefined" when a segment held consecutive underscores
- Noted that an addon may override the repository indentation for its own JS/TS when its ESLint config matches
Copilot AI review requested due to automatic review settings August 20, 2026 09:16

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 127 out of 131 changed files in this pull request and generated 1 comment.

Suppressed comments (4)

addons/files/gameplay_changes/graves/packs/BP/scripts/locator.ts:169

  • Same issue here: world.getDimension(record.dim) may throw. If that happens during a drift update, locator syncing will crash instead of just skipping the move.
    addons/files/gameplay_changes/graves/.vscode/settings.json:47
  • This JSON file has a trailing comma before the closing brace, which makes it invalid JSON and will prevent VS Code from loading the settings.
	"eslint.workingDirectories": [
		{
			"mode": "auto"
		}
	],
}

addons/files/gameplay_changes/graves/packs/BP/scripts/locator.ts:64

  • world.getDimension(record.dim) can throw for unknown/removed dimensions (and elsewhere in the addon you already guard it with try/catch). Here it’s unguarded, so a bad record could crash the locator sync path.

This issue also appears on line 156 of the same file.
addons/files/gameplay_changes/graves/packs/BP/scripts/UI/GraveDetail.tsx:49

  • world.getDimension(record.dim) may throw; if it does, using the teleport action will crash the handler instead of safely doing nothing. Consider guarding this the same way as other dimension lookups (e.g., in forcepurge).

Comment thread tools/create-addon.mjs Outdated
drav0011 and others added 2 commits August 21, 2026 00:33
- Run the bedrock-core CLI with an argument array instead of a shell string, so a description containing $(...), backticks, & or %VAR% is passed through as text
- Resolve npm's npx-cli.js next to the running Node binary, since Windows ships npx as a .cmd shim that cannot be spawned without a shell

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Add util.dimensionOf(), a guarded world.getDimension() for stored record.dim ids, which throws rather than returning undefined when the dimension no longer resolves
- Route the locator bar (waypoint build + drift move) and the admin teleport action through it, so a stale dimension id skips the work instead of crashing the handler
- Drop the trailing comma from the addon .vscode/settings.json

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings August 20, 2026 22:33
@drav0011

Copy link
Copy Markdown
Member Author

Also took the three suppressed findings from the second review pass, since they were the same real bug in two places.

world.getDimension() throws on an id it does not know — it does not return undefined — so the if (!dimension) checks in locator.ts were dead code, and GraveDetail.tsx had none at all. record.dim is long-lived JSON in a world dynamic property: an id written while a custom-dimension pack was installed outlives that pack.

Added one guard in util.ts and routed the three sites through it:

export const dimensionOf = (dimId: string): Dimension | undefined => {
  try {
    return world.getDimension(dimId);
  } catch {
    return undefined;
  }
};
  • locator.ts:60 (buildWaypoint) — a stale record is skipped, the rest of the bar still syncs.
  • locator.ts:157 (drift move) — the waypoint keeps its old position instead of taking down sync() mid-loop.
  • GraveDetail.tsx:46 (operator teleport) — logs a warning and leaves the screen open, rather than crashing the handler.

purge.ts:79 keeps its own inline try/catch: it needs continue semantics inside the ticking-area loop, and the comment there ("leave the tombstone alone") is about tombstone policy, not dimension lookup.

tsc --noEmit and eslint . are clean on the addon.

Copilot AI left a comment

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.

Pull request overview

Copilot reviewed 127 out of 131 changed files in this pull request and generated 3 comments.

Suppressed comments (2)

addons/files/gameplay_changes/graves/packs/BP/scripts/UI/GraveList.tsx:56

  • The mapped grave rows don’t provide a stable key, which can cause incorrect reconciliation when the list changes (e.g., after purges/toggles).
    addons/files/gameplay_changes/graves/packs/BP/scripts/UI/AdminPanel.tsx:39
  • The mapped admin rows don’t provide a stable key, which can cause incorrect reconciliation when the list changes.

Comment thread tools/create-addon.mjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

addons Indicates the issue is related to Addons confirmed Something that is confirmed and needs to be done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants