Skip to content

Commit 9c21acb

Browse files
committed
Merge remote-tracking branch 'origin/master-1.20-lts' into master-1.21-lts
2 parents 2c8873a + b6ac1ff commit 9c21acb

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

AGENTS.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,14 @@ When adding new features or fixing bugs:
6969
- **Always** add game tests when the feature interacts with Minecraft gameplay systems
7070
- Look at existing tests in the respective directories for examples of test patterns and conventions
7171

72+
### Testing advancements
73+
74+
When writing game tests for advancements, don't just call criterion triggers directly, but try to simulate actual game logic to invoke the criterion triggers indirectly.
75+
76+
### Test coverage
77+
78+
When adding new tests for the sake of increasing test coverage, you can measure coverage by running `./gradlew test runGameTestServer jacocoTestReport`, and checking the coverage output in `build/reports/jacoco/test/`.
79+
7280
## Building the Project
7381

7482
### Prerequisites
@@ -132,8 +140,6 @@ ln -s ../../scripts/pre-commit .git/hooks/pre-commit
132140
6. **Format code**: `./gradlew spotlessApply`
133141
7. **Commit**: Use clear, descriptive commit messages
134142

135-
## Project Dependencies
136-
137143
## Release Management
138144

139145
Version bumping and release management helper scripts are available in the [CyclopsMC/ReleaseHelpers](https://github.com/CyclopsMC/ReleaseHelpers) repository. These bash scripts assist with:
@@ -180,3 +186,18 @@ See `.github/workflows/ci.yml` for the full CI configuration.
180186
3. **Multi-loader compatibility**: Ensure changes work across all supported loaders
181187
4. **Build validation**: Never commit without running `build` (and `runGameTestServer` for MC 1.21+)
182188
5. **Code quality**: Follow existing patterns and conventions in the codebase
189+
190+
## Code changes across Minecraft updates
191+
192+
When I ask you to things such as "fix upmerge issues" or "update to the next Minecraft version",
193+
this means that I want you to help resolve compilation errors
194+
that were introduced due to upmerging code from an older minecraft version to a newer minecraft version.
195+
The old minecraft version can be found in the `.upmerge-src-branch` file of the parent directory,
196+
and the new minecraft version can be found in `gradle.properties`.
197+
Changes may also include fixing merge conflicts.
198+
199+
IMPORTANT: Some changes may be non-trivial,
200+
for which you can find detail background information for each seperate Minecraft update within these primers: https://github.com/neoforged/.github/tree/main/primers
201+
The blogs of https://neoforged.net/ and https://fabricmc.net/blog/ may also contain useful porting help.
202+
203+
After making all necessary changes, make sure the code fully compiles and the (game) tests pass.

0 commit comments

Comments
 (0)