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

Add support to NBTIngredient for handling attachments #638

Merged
merged 5 commits into from
Feb 23, 2024

Conversation

pupnewfster
Copy link
Member

This adds support so NBT Ingredients will support the following cases (some they already supported):

  • partial nbt
  • partial attachment data
  • partial nbt and partial attachment data
  • strict nbt with no attachments present
  • strict attachment matching with no nbt present
  • strict attachment matching and strict nbt matching

@pupnewfster pupnewfster added enhancement New (or improvement to existing) feature or request 1.20 Targeted at Minecraft 1.20 labels Feb 14, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Feb 14, 2024

  • Publish PR to GitHub Packages

Last commit published: e8a4ba76aa8868625667a4e0c22256ccfc0fcada.

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 #638' // https://github.com/neoforged/NeoForge/pull/638
        url 'https://prmaven.neoforged.net/NeoForge/pr638'
        content {
            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-pr638.
On Powershell you will need to remove the -L flag from the curl invocation.

mkdir NeoForge-pr638
cd NeoForge-pr638
curl -L https://prmaven.neoforged.net/NeoForge/pr638/net/neoforged/neoforge/20.4.177-pr-638-attachment_ingredients/mdk-pr638.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
Member

@Technici4n Technici4n left a comment

Choose a reason for hiding this comment

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

null NBT and empty NBT are different. Does this PR allow differentiating between the two? (e.g. only accept a stack with no NBT whatsoever)

@pupnewfster
Copy link
Member Author

When in strict mode yes, when in partial I don't remember if vanilla differentiates between null and empty for purposes of partial nbt

@pupnewfster pupnewfster merged commit d461ffe into neoforged:1.20.x Feb 23, 2024
4 checks passed
@pupnewfster pupnewfster deleted the attachment_ingredients branch February 23, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.20 Targeted at Minecraft 1.20 enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants