You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+33-3Lines changed: 33 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,15 @@ This will ensure all data matches schema among other checks.
31
31
32
32
There are no 'releases' in this repo beyond updating the data itself. Instead, we have a workflow that will automatically create tagged releases if the user runs the /makerelease slash command, so you can inform the user about that if a release is needed.
33
33
34
+
## Testing
35
+
Always run tests after data changes to ensure local tests are passing:
36
+
37
+
```sh
38
+
cd tools/js
39
+
npm install
40
+
npm test -- --bail 2>&1| tail -100
41
+
```
42
+
34
43
## Data
35
44
36
45
Most data is generated with data generators. For mcpc, data is generated with [minecraft-data-generator](https://github.com/PrismarineJS/minecraft-data-generator).
@@ -57,7 +66,28 @@ Not all data is generated. Some data (like protocol schemas) is manually curated
57
66
58
67
### Protocol data
59
68
60
-
We use a special yaml-like DSL to generate protocol.json files. Refer to doc/protocol.md for info.
61
-
These files are stored inside proto.yml files in the latest/ folder (like bedrock/latest/proto.yml) for the latest version, otherwise in the versioned folder (like pc/1.20/proto.yml).
69
+
We use a special YAML-like DSL to generate protocol.json files. Refer to doc/protocol.md for info.
70
+
These files are stored inside proto.yml (and an imported types.yml support file on bedrock) files in the latest/ folder (like bedrock/latest/proto.yml) for the latest version, otherwise in the versioned folder (like pc/1.20/proto.yml).
71
+
72
+
👉 Run `npm run build` in tools/js to regenerate protocol.json files after making changes to the protocol yaml files.
73
+
74
+
❌ Don't make changes to protocol.json files directly. Instead, update the relevant proto.yml file in latest/ and regenerate protocol.json by running `npm run build` in tools/js.
75
+
76
+
If you need to edit many files at once, consider writing a simple Node.js script to replace. E.g., from `cd tools/js && npm i && node __replace_something.js`):
When updating, apply minimum required changes when possible.
62
89
63
-
Notably, run `npm run build` in tools/js to regenerate protocol.json files after making changes to the protocol yaml files. So, don't make changes to protocol.json files directly. Instead, update the relevant proto.yml file in latest/ and regenerate protocol.json by running `npm run build` in tools/js.
90
+
1. Do not rename fields or packets unless their value has changed, even if they may have 'officially' changed. If their values *have* significantly changed (varint -> i32 maybe insignificant from primitive standpoint, string to number is), it maybe a good idea to rename the field or packet.
91
+
2. Do not rename existing enums or other data, even if they were renamed in the game. You may add or remove data as is needed as this does not unnecessarily affect existing code relying on old names.
92
+
3. Always read the information in doc/protocol.md to understand our YAML format.
93
+
4. Try to inline types as much as possible--this includes mappers and switch statements. Don't create extra types unless they are actually re-used in multiple places, or very large to warrant seperation.
title: Add bedrock ${{ github.event.inputs.minecraftVersion }} data
71
+
body: |
72
+
## Bedrock Version Bump
73
+
74
+
This PR adds support for Minecraft Bedrock Edition version **${{ github.event.inputs.minecraftVersion }}** with protocol version **${{ github.event.inputs.protocolVersion }}**.
75
+
76
+
### Changes
77
+
- ✅ Protocol version bumped to ${{ github.event.inputs.protocolVersion }}
78
+
- ✅ Minecraft version updated to ${{ github.event.inputs.minecraftVersion }}
79
+
- ✅ Previous proto.yml files moved to versioned folder
80
+
- ✅ Updated protocolVersions.json and versions.json
81
+
- ✅ Regenerated all protocol.json files
82
+
- ✅ All tests passing
83
+
84
+
### How this was generated
85
+
This PR was automatically generated using the bedrock version bump workflow.
0 commit comments