Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.21] Fix duplicate registration error for empty loot table #1151

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

XFactHD
Copy link
Member

@XFactHD XFactHD commented Jun 20, 2024

This PR fixes the duplicate registration error for the empty loot table when a loot table is loaded as empty due to resource conditions, the LootTableLoadEvent is canceled or the table is set to LootTable.EMPTY in the event.

@XFactHD XFactHD added bug A bug or error 1.21 Targeted at Minecraft 1.21 data driven This request involves a data driven system labels Jun 20, 2024
@XFactHD XFactHD requested a review from Technici4n June 20, 2024 03:27
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jun 20, 2024

  • Publish PR to GitHub Packages

Last commit published: 204949d02ddb9c5ba53f1cc68b11b1556793cd43.

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 #1151' // https://github.com/neoforged/NeoForge/pull/1151
        url 'https://prmaven.neoforged.net/NeoForge/pr1151'
        content {
            includeModule('net.neoforged', 'neoforge')
            includeModule('net.neoforged', 'testframework')
        }
    }
}

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-pr1151.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr1151
cd NeoForge-pr1151
curl -L https://prmaven.neoforged.net/NeoForge/pr1151/net/neoforged/neoforge/21.0.22-beta-pr-1151-fix_loottable_load/mdk-pr1151.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.

Copy link
Contributor

@ChampionAsh5357 ChampionAsh5357 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine, though I would prefer a comment mentioning that this will be mapped to an empty Optional in LootDataType in case this breaks from a vanilla change in the future.

@pupnewfster pupnewfster merged commit 6481868 into neoforged:1.21.x Jun 22, 2024
3 of 4 checks passed
@XFactHD XFactHD deleted the fix_loottable_load branch June 22, 2024 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21 Targeted at Minecraft 1.21 bug A bug or error data driven This request involves a data driven system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants