spawnpack 0.1.19 → 0.1.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spawnpack",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "Minecraft Bedrock addon project generator — scaffold your BP+RP in seconds",
5
5
  "author": "veedy-dev",
6
6
  "license": "MIT",
@@ -1,20 +1,3 @@
1
- ## Priorities
2
-
3
- 1. Implement the user's requested behavior completely.
4
- 2. Use the smallest maintainable change that fits existing project patterns.
5
- 3. Verify the changed behavior with the least expensive reliable check.
6
- 4. Preserve unrelated user work and avoid expanding scope.
7
-
8
- ## Scope and execution
9
-
10
- - Read the relevant source, configuration, references, and callers before editing. For a bug, fix the shared root cause rather than one visible symptom.
11
- - Act immediately on small, clear tasks. Plan only when the approach is materially ambiguous, architectural, or risky.
12
- - Ask a question only when repository evidence and documentation cannot resolve choices with meaningfully different outcomes.
13
- - Do not add unrelated features, refactors, abstractions, dependencies, documentation, or cleanup.
14
- - Reuse existing helpers and patterns first, then the standard library or platform, then already-installed dependencies.
15
- - You may suggest a production dependency when it is the smallest suitable solution, but explain why and ask the user before adding it.
16
- - Keep changes local and migrate every affected caller. Remove obsolete code introduced by the changed path; do not leave compatibility shims unless requested.
17
-
18
1
  ## Documentation lookup
19
2
 
20
3
  - Before planning or implementing any Minecraft Bedrock change, verify the current relevant documentation. This includes Script API and BP/RP JSON formats, components, events, schemas, MoLang, manifests, commands, animations, and pack behavior.
@@ -31,17 +14,12 @@
31
14
 
32
15
  ## Code rules
33
16
 
34
- - Prefer boring, linear code, guard clauses, explicit state names, and one source of truth.
35
- - Do not build speculative flexibility. Avoid one-implementation interfaces, factories for one product, and helpers used once unless they materially clarify the code.
36
- - Preserve input validation, security boundaries, and protections against data loss, duplication, or invalid world state.
37
17
  - Do not write comments in code. Use clear naming and straightforward structure so the code is self-explanatory.
38
18
  - Validate predictable invalid states before calling an API. Use `try-catch` only for a documented or observed unguardable failure when the catch performs meaningful recovery, cleanup, translation, or contextual rethrow. Keep the `try` block narrow; never silently swallow errors.
39
- - Avoid repeated allocation, copying, logging, or exception handling in tick handlers and other hot paths.
40
- - Follow the existing TypeScript configuration and style. Do not introduce unused imports, variables, or exports.
41
19
 
42
20
  ## Minecraft Bedrock conventions
43
21
 
44
- - Check entity validity, optional components, and unloaded blocks with guards before use.
22
+ - Guard before Script API calls that can throw: check `entity.isValid` (players are valid only while loaded) before `getComponent`/`getComponents`; confirm the chunk is loaded before `dimension.getBlock`/`spawnEntity`; and use containers only after re-fetching them from a current block or entity rather than holding a stale reference. Defer world-mutating work from read-only or early-execution callbacks with `system.run`. Reserve `try-catch` for calls whose validity cannot be checked in advance, such as `runCommand` throwing `CommandError`.
45
23
  - Prefer `@minecraft/vanilla-data` typed identifiers over raw component, entity, block, item, and effect strings.
46
24
  - Check `@minecraft/math` before writing vector, matrix, clamp, lerp, or similar math helpers.
47
25
  - Validate changed BP/RP JSON against the project's configured Bedrock schemas when available.
@@ -52,7 +30,7 @@
52
30
  - Prefer event-driven subscriptions over polling. Avoid per-tick held-item or inventory scans and repeated dynamic-property serialization.
53
31
  - In hot loops, iterate maps directly with `for (const value of map.values())`. Do not spread maps into temporary arrays or iterate entry pairs when values or keys are enough.
54
32
  - Cache stable configuration in memory and persist only when values actually change.
55
- - Prefer validity and loaded-position guards over exception handling. Keep `try-catch` only at documented or observed unguardable boundaries, and require meaningful recovery; never use an empty catch as routine control flow.
33
+ - Guard invalid states with conditions before they reach the API — unloaded chunks or locations, invalid or despawned entities, etc so Minecraft Bedrock does not throw. Guards are required wherever a state check is possible. Prefer guards over `try-catch`; `try-catch` is allowed only for documented or observed unguardable failures, and must perform meaningful recovery — never rely on it as routine control flow or swallow errors.
56
34
 
57
35
  ## Repository hygiene
58
36
 
@@ -66,4 +44,3 @@
66
44
 
67
45
  - Be direct and concise. State assumptions only when they materially affect the implementation.
68
46
  - After changes, report what changed, the verification evidence, and any real blocker or residual risk. Do not add ritual sections for untouched files.
69
- - Never report completion with known errors in the changed path or imply that a check ran when it did not.
@@ -1,20 +1,3 @@
1
- ## Priorities
2
-
3
- 1. Implement the user's requested behavior completely.
4
- 2. Use the smallest maintainable change that fits existing project patterns.
5
- 3. Verify the changed behavior with the least expensive reliable check.
6
- 4. Preserve unrelated user work and avoid expanding scope.
7
-
8
- ## Scope and execution
9
-
10
- - Read the relevant source, configuration, references, and callers before editing. For a bug, fix the shared root cause rather than one visible symptom.
11
- - Act immediately on small, clear tasks. Plan only when the approach is materially ambiguous, architectural, or risky.
12
- - Ask a question only when repository evidence and documentation cannot resolve choices with meaningfully different outcomes.
13
- - Do not add unrelated features, refactors, abstractions, dependencies, documentation, or cleanup.
14
- - Reuse existing helpers and patterns first, then the standard library or platform, then already-installed dependencies.
15
- - You may suggest a production dependency when it is the smallest suitable solution, but explain why and ask the user before adding it.
16
- - Keep changes local and migrate every affected caller. Remove obsolete code introduced by the changed path; do not leave compatibility shims unless requested.
17
-
18
1
  ## Documentation lookup
19
2
 
20
3
  - Before planning or implementing any Minecraft Bedrock change, verify the current relevant documentation. This includes Script API and BP/RP JSON formats, components, events, schemas, MoLang, manifests, commands, animations, and pack behavior.
@@ -31,17 +14,12 @@
31
14
 
32
15
  ## Code rules
33
16
 
34
- - Prefer boring, linear code, guard clauses, explicit state names, and one source of truth.
35
- - Do not build speculative flexibility. Avoid one-implementation interfaces, factories for one product, and helpers used once unless they materially clarify the code.
36
- - Preserve input validation, security boundaries, and protections against data loss, duplication, or invalid world state.
37
17
  - Do not write comments in code. Use clear naming and straightforward structure so the code is self-explanatory.
38
18
  - Validate predictable invalid states before calling an API. Use `try-catch` only for a documented or observed unguardable failure when the catch performs meaningful recovery, cleanup, translation, or contextual rethrow. Keep the `try` block narrow; never silently swallow errors.
39
- - Avoid repeated allocation, copying, logging, or exception handling in tick handlers and other hot paths.
40
- - Follow the existing TypeScript configuration and style. Do not introduce unused imports, variables, or exports.
41
19
 
42
20
  ## Minecraft Bedrock conventions
43
21
 
44
- - Check entity validity, optional components, and unloaded blocks with guards before use.
22
+ - Guard before Script API calls that can throw: check `entity.isValid` (players are valid only while loaded) before `getComponent`/`getComponents`; confirm the chunk is loaded before `dimension.getBlock`/`spawnEntity`; and use containers only after re-fetching them from a current block or entity rather than holding a stale reference. Defer world-mutating work from read-only or early-execution callbacks with `system.run`. Reserve `try-catch` for calls whose validity cannot be checked in advance, such as `runCommand` throwing `CommandError`.
45
23
  - Prefer `@minecraft/vanilla-data` typed identifiers over raw component, entity, block, item, and effect strings.
46
24
  - Check `@minecraft/math` before writing vector, matrix, clamp, lerp, or similar math helpers.
47
25
  - Validate changed BP/RP JSON against the project's configured Bedrock schemas when available.
@@ -52,7 +30,7 @@
52
30
  - Prefer event-driven subscriptions over polling. Avoid per-tick held-item or inventory scans and repeated dynamic-property serialization.
53
31
  - In hot loops, iterate maps directly with `for (const value of map.values())`. Do not spread maps into temporary arrays or iterate entry pairs when values or keys are enough.
54
32
  - Cache stable configuration in memory and persist only when values actually change.
55
- - Prefer validity and loaded-position guards over exception handling. Keep `try-catch` only at documented or observed unguardable boundaries, and require meaningful recovery; never use an empty catch as routine control flow.
33
+ - Guard invalid states with conditions before they reach the API — unloaded chunks or locations, invalid or despawned entities, etc so Minecraft Bedrock does not throw. Guards are required wherever a state check is possible. Prefer guards over `try-catch`; `try-catch` is allowed only for documented or observed unguardable failures, and must perform meaningful recovery — never rely on it as routine control flow or swallow errors.
56
34
 
57
35
  ## Repository hygiene
58
36
 
@@ -66,4 +44,3 @@
66
44
 
67
45
  - Be direct and concise. State assumptions only when they materially affect the implementation.
68
46
  - After changes, report what changed, the verification evidence, and any real blocker or residual risk. Do not add ritual sections for untouched files.
69
- - Never report completion with known errors in the changed path or imply that a check ran when it did not.