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 getter for baked standalone models #1751

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

embeddedt
Copy link
Member

This PR makes it possible to actually retrieve the baked standalone models, which is no longer possible using the default ModelManager#getModel due to them being put into a separate map. I opted to add a separate getter rather than injecting them into the bakedBlockStateModels since the latter would require constructing ModelResourceLocation keys for all of them, which we don't seem to do anymore.

@embeddedt embeddedt added bug A bug or error 1.21.4 Targeted at Minecraft 1.21.4 labels Dec 7, 2024
@embeddedt embeddedt requested a review from XFactHD December 7, 2024 22:52
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Dec 7, 2024

  • Publish PR to GitHub Packages

Last commit published: 8f5503d55714d875684aca37f299c1ec8056c61a.

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

mkdir NeoForge-pr1751
cd NeoForge-pr1751
curl -L https://prmaven.neoforged.net/NeoForge/pr1751/net/neoforged/neoforge/21.4.12-beta-pr-1751-add-standalone-model-getter/mdk-pr1751.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

@XFactHD XFactHD left a comment

Choose a reason for hiding this comment

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

ModelResourceLocations are now only used for assigning models to blockstates, everything else uses normal ResourceLocations in separate maps. This is why the "standalone" models are now kept separate.

@XFactHD XFactHD merged commit aa2412f into neoforged:1.21.x Dec 9, 2024
7 checks passed
@neoforged-releases
Copy link

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

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 bug A bug or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.21.4] Unable to access baked standalone models through ModelManager
2 participants