-
-
Notifications
You must be signed in to change notification settings - Fork 179
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.3] Expose vanilla model generators for modded usages #1696
base: 1.21.x
Are you sure you want to change the base?
Conversation
Last commit published: 937460d091f56548d8fdb84b6fc03bcf5b9719ba. PR PublishingThe artifacts published by this PR:
Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven {
name 'Maven for PR #1696' // https://github.com/neoforged/NeoForge/pull/1696
url 'https://prmaven.neoforged.net/NeoForge/pr1696'
content {
includeModule('net.neoforged', 'neoforge')
includeModule('net.neoforged', 'testframework')
}
}
} MDK installationIn order to setup a MDK using the latest PR version, run the following commands in a terminal. mkdir NeoForge-pr1696
cd NeoForge-pr1696
curl -L https://prmaven.neoforged.net/NeoForge/pr1696/net/neoforged/neoforge/21.3.73-beta-pr-1696-pr-vanilla-data-gen/mdk-pr1696.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. |
patches/net/minecraft/data/models/model/ModelTemplate.java.patch
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/common/extensions/IBlockModelGenerators.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/common/extensions/IItemModelGenerators.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/common/extensions/IModelProviderExtension.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/common/extensions/IModelTemplateExtension.java
Outdated
Show resolved
Hide resolved
src/main/java/net/neoforged/neoforge/common/data/vanilla/ModelTemplateWithCustomData.java
Outdated
Show resolved
Hide resolved
patches/net/minecraft/data/models/ItemModelGenerators.java.patch
Outdated
Show resolved
Hide resolved
patches/net/minecraft/data/models/BlockModelGenerators.java.patch
Outdated
Show resolved
Hide resolved
patches/net/minecraft/data/models/blockstates/VariantProperties.java.patch
Outdated
Show resolved
Hide resolved
ef5aee3
to
274a141
Compare
Expose everything from ItemModelGenerators and BlockModelGenerators
Support modded paths in ModelTemplate.create
…ilders rather then ResLoc
Allow setting render types for model templates
Allow setting custom data from TexturedModel
Allow specifying render typed by strings (defaulting to "minecraft" namespace) Add mod and minecraft model path helpers Fix block models generating empty content
Making them more consistent and the patches easier to read
274a141
to
a605c7b
Compare
This PR allows modders to make use of the vanilla model generators and all the helpers/utilities that come with them.
This is done by adding methods which modders must override in each of the main data providers, failing to override these methods will result in vanilla models being generated.
Various
ResourceLocation.withDefaultNamespace
calls have also been patched to now callResourceLocation.parse
, this is to support passing in paths with modded namespaces.With 1.21.4 and all of its model changes, this is intended as a stepping point towards using the vanilla generators. Rather than having to patch and potentially rewrite ours to support all these changes.
TODO
ExistingFileHelper
support, validate referenced textures and parent models existModelBuilder
to pass its output toItemModelOutput
, allowing modders to build custom modelsRenderType
and face data extensions when using template modelsOriginal conversation can be found in NeoCord