NeoForge icon indicating copy to clipboard operation
NeoForge copied to clipboard

[1.20.6] Use extensible enum codec and streamcodec for rarity enum

Open XFactHD opened this issue 1 month ago • 1 comments

This PR fixes the Rarity enum (which is made extensible by NeoForge) using the wrong Codec and StreamCodec and crashing when a non-vanilla rarity is encountered.

XFactHD avatar May 12 '24 22:05 XFactHD

  • [x] Publish PR to GitHub Packages

Last commit published: bb2374957e22305195117b85f502ad50038a6288.

PR Publishing

The artifacts published by this PR:

Repository Declaration

In order to use the artifacts published by the PR, add the following repository to your buildscript:

repositories {
    maven {
        name 'Maven for PR #958' // https://github.com/neoforged/NeoForge/pull/958
        url 'https://prmaven.neoforged.net/NeoForge/pr958'
        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-pr958.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr958
cd NeoForge-pr958
curl -L https://prmaven.neoforged.net/NeoForge/pr958/net/neoforged/neoforge/20.6.63-beta-pr-958-rarity_enum_codec/mdk-pr958.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.