In vanilla Mojang has data fixers which appends all legacy/removed feature flags to a list (removed_features) in the level data, allowing crash reports to be aware of which flags were active and have since been removed.
This PR implements a simple hook to append unknown modded flags to this list, allowing modders to know if a crash happened in an environment where their alpha testing was once enabled.
An example crash report can be found here, take note of the Removed feature flags: entry, which lists all our test flags.
PR Publishing
### The artifacts published by this PR:
- :package: [`net.neoforged:testframework:21.3.42-beta-pr-1703-pr-removed-flags`](https://github.com/neoforged/NeoForge/packages/2324270)
- :package: [`net.neoforged:neoforge:21.3.42-beta-pr-1703-pr-removed-flags`](https://github.com/neoforged/NeoForge/packages/2324269)
### Repository Declaration
In order to use the artifacts published by the PR, add the following repository to your buildscript:
```gradle
repositories {
maven {
name 'Maven for PR #1703' // https://github.com/neoforged/NeoForge/pull/1703
url 'https://prmaven.neoforged.net/NeoForge/pr1703'
content {
includeModule('net.neoforged', 'testframework')
includeModule('net.neoforged', 'neoforge')
}
}
}
```
### MDK installation
In order to setup a MDK using the latest PR version, run the following commands in a terminal.
The script works on both *nix and Windows as long as you have the JDK `bin` folder on the path.
The script will clone the MDK in a folder named `NeoForge-pr1703`.
On Powershell you will need to remove the `-L` flag from the `curl` invocation.
```sh
mkdir NeoForge-pr1703
cd NeoForge-pr1703
curl -L https://prmaven.neoforged.net/NeoForge/pr1703/net/neoforged/neoforge/21.3.42-beta-pr-1703-pr-removed-flags/mdk-pr1703.zip -o mdk.zip
jar xf mdk.zip
rm mdk.zip || del mdk.zip
```
To test a production environment, you can download the installer from [here](https://prmaven.neoforged.net/NeoForge/pr1703/net.neoforged/neoforge/21.3.42-beta-pr-1703-pr-removed-flags/neoforge-21.3.42-beta-pr-1703-pr-removed-flags-installer.jar).
In vanilla Mojang has data fixers which appends all legacy/removed feature flags to a list (
removed_features
) in the level data, allowing crash reports to be aware of which flags were active and have since been removed.This PR implements a simple hook to append unknown modded flags to this list, allowing modders to know if a crash happened in an environment where their alpha testing was once enabled.
An example crash report can be found here, take note of the
Removed feature flags:
entry, which lists all our test flags.