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

Guard against item BakedModels using incorrect RenderTypes #1822

Merged
merged 4 commits into from
Jan 10, 2025

Conversation

Technici4n
Copy link
Member

Should we backport this to 1.21.1? This might break some models, but using the wrong RenderType can lead to subtle correctness or performance issues.

@neoforged-automation neoforged-automation bot added the 1.21.4 Targeted at Minecraft 1.21.4 label Jan 4, 2025
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Jan 4, 2025

  • Publish PR to GitHub Packages

Last commit published: 2032d12445c0a371f97ac45a5cfbe6229d44636a.

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

mkdir NeoForge-pr1822
cd NeoForge-pr1822
curl -L https://prmaven.neoforged.net/NeoForge/pr1822/net/neoforged/neoforge/21.4.55-beta-pr-1822-item-rendertype-check/mdk-pr1822.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.

marchermans
marchermans previously approved these changes Jan 4, 2025
@marchermans
Copy link
Contributor

Sadly we can't really backport this, although I would have appreciated it yesterday.

@embeddedt
Copy link
Member

Is it necessarily the case that every model that doesn't use DefaultVertexFormat.NEW_ENTITY will have issues?

@Technici4n
Copy link
Member Author

Not necessarily, no. In principle, one could use a RenderType that uses less data than what is passed to the VertexConsumer, and could register it to be buffered properly. That will ignore some of the data (e.g. overlay or lightmap coordinates), but will otherwise render something.

@embeddedt embeddedt merged commit 44e71fe into neoforged:1.21.x Jan 10, 2025
6 checks passed
@neoforged-releases
Copy link

🚀 This PR has been released as NeoForge version 21.4.51-beta.

Soaryn pushed a commit to Soaryn/EnergyHandlerPR that referenced this pull request Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.4 Targeted at Minecraft 1.21.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants