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
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Generated data ends up under `mc/<version>/run/server/minecraft-data` in the rep
13
13
- versions.json — canonical JSON array of versions that are supported (i.e. there are folders in mc/ for it)
14
14
- mc-source/<version> — (External) minecraft java edition code for relevant version with Mojang mappings that you can reference for changes.
15
15
* we store the last 2 most recent versions in the folder to save space, but if you need more versions you can do `cd mc-source && git ls-remote 'https://github.com/extremeheat/extracted_minecraft_data' && git clone 'https://github.com/extremeheat/extracted_minecraft_data' --depth 1 -b client1.20.3 1.20.3 && cd 1.20.3`
16
-
* there is a .diff file in mc-source/ like `1.21.7_to_1.21.8.diff` that contains result of `git diff --no-index old new` that you can reference for changes (note it's typically large)
16
+
* there is a .diff file in mc-source/ like `1.21.7_to_1.21.8.diff` that contains result of `git diff --no-index -M50% -l2000 old new` that you can reference for changes (note it's typically large)
17
17
* Since our generator is using Mojang mappings, the API naming is the same.
18
18
- README.md — info how to set up
19
19
@@ -30,9 +30,17 @@ and figure out how to replicate, debug and fix the logical issues in data genera
30
30
31
31
## Troubleshooting
32
32
33
-
Simply iterating over errors one by one is a good way to fix most issues. Inside mc-source/ you are provided the latest
34
-
code for the latest minecraft versions you can reference to investigate any code changes that we may need to accomodate in our
35
-
generator code.
33
+
Simply iterating over errors one by one is a good way to fix most issues. The `mc-source/` directory contains the two
34
+
most recent Minecraft versions (e.g. `mc-source/1.21.10/` and `mc-source/1.21.11/`) plus a diff file between them.
35
+
When searching for code, always target a specific version directory (e.g. search in `mc-source/1.21.11/` not `mc-source/`)
36
+
to avoid clutter and confusion.
37
+
38
+
Importantly, before assuming a class/method was removed, check the diff file for renames first. Renames/moves appear as:
39
+
```
40
+
rename from net/minecraft/world/entity/animal/WaterAnimal.java
41
+
rename to net/minecraft/world/entity/animal/fish/WaterAnimal.java
42
+
```
43
+
If not found in the diff (rename detection has a 2000 file limit), search the specific version directory to locate the class.
36
44
37
45
Sometimes, some APIs might change inside the mc code and make the data that the current code extracts no longer
38
46
valid. In these cases, do your best to conform the new data to the old structure even if it feels wrong. If you
@@ -44,8 +52,8 @@ You can propose a new schema to the user (so that the relevant changes can be ma
44
52
- Reproduce the problem locally inside the container and run the generator task.
45
53
- Example run command: `./gradlew :mc:1.21.6:runServer --stacktrace`
46
54
- See if the problem exists on an older version -- if so inform the user, otherwise compare logs and code
47
-
- Inspect diffs in `mc-source/`to correlate Mojang API changes.
48
-
- See mc-source/
55
+
- Inspect diffs in `mc-source/`for API changes, renames, and moves
56
+
- Search the specific version directory (e.g. `mc-source/1.21.11/`) to locate moved/renamed classes
49
57
- Validate generated output at `mc/<version>/run/server/minecraft-data` to make sure all files are there
0 commit comments