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.4] Expose vanilla model generators for modded usages #1725

Merged
merged 70 commits into from
Dec 24, 2024

Conversation

ApexModder
Copy link
Contributor

Updated version of #1696 for 1.21.4.

While the vanilla providers have been exposed for modded usage, and can be used for more simpler model generation. This is still highly WIP and requires more patches to support our model extensions and generating a model from scratch.

@ApexModder ApexModder added the 1.21.4 Targeted at Minecraft 1.21.4 label Dec 3, 2024
@neoforged-pr-publishing
Copy link

neoforged-pr-publishing bot commented Dec 3, 2024

  • Publish PR to GitHub Packages

Last commit published: 2d4f8a00cce8bd87a311150b8bb3ba5f73bf72d8.

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

mkdir NeoForge-pr1725
cd NeoForge-pr1725
curl -L https://prmaven.neoforged.net/NeoForge/pr1725/net/neoforged/neoforge/21.4.111-beta-pr-1725-pr-vanilla-datagen-21.4/mdk-pr1725.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.

@neoforged-automation
Copy link

@ApexModder, this pull request has conflicts, please resolve them for this PR to move forward.

@ApexModder ApexModder force-pushed the pr/vanilla-datagen-21.4 branch from 41e1c12 to 3d04267 Compare December 3, 2024 18:47
@ApexModder ApexModder changed the base branch from port/1.21.4 to 1.21.x December 3, 2024 18:48
@ApexModder
Copy link
Contributor Author

ApexModder commented Dec 3, 2024

Merged in @XFactHD fork, everything should be exposed and usable. Test mod datagen just needs rewriting to now use vanilla model providers.

@neoforged-compatibility-checks
Copy link

neoforged-compatibility-checks bot commented Dec 3, 2024

@ApexModder, this PR introduces breaking changes.
Fortunately, this project is currently accepting breaking changes, but if they are not intentional, please revert them.
Last checked commit: 2d4f8a00cce8bd87a311150b8bb3ba5f73bf72d8.

Compatibility checks

neoforge (:neoforge)

  • net/neoforged/neoforge/client/model/generators/MultiPartBlockStateBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$ElementBuilder$RotationBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/BlockModelBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelFile
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ConfiguredModel$Builder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$ElementBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$ElementBuilder$FaceBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/loaders/ObjModelBuilder
    • ❗ Class missing superclass of net/neoforged/neoforge/client/model/generators/CustomLoaderBuilder
    • begin(Lnet/neoforged/neoforge/client/model/generators/ModelBuilder;Lnet/neoforged/neoforge/common/data/ExistingFileHelper;)Lnet/neoforged/neoforge/client/model/generators/loaders/ObjModelBuilder;: ❗ API method was removed
    • <init>(Lnet/neoforged/neoforge/client/model/generators/ModelBuilder;Lnet/neoforged/neoforge/common/data/ExistingFileHelper;)V: ❗ API method was removed
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$RootTransformsBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/loaders/SeparateTransformsModelBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/BlockModelProvider
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/loaders/DynamicFluidContainerModelBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/MultiPartBlockStateBuilder$PartBuilder$ConditionGroup
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$TransformsBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/MultiPartBlockStateBuilder$PartBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/loaders/CompositeModelBuilder
    • ❗ Class missing superclass of net/neoforged/neoforge/client/model/generators/CustomLoaderBuilder
    • child(Ljava/lang/String;Lnet/neoforged/neoforge/client/model/generators/ModelFile;)Lnet/neoforged/neoforge/client/model/generators/loaders/CompositeModelBuilder;: ❗ API method was removed
    • <init>(Lnet/neoforged/neoforge/client/model/generators/ModelBuilder;Lnet/neoforged/neoforge/common/data/ExistingFileHelper;)V: ❗ API method was removed
    • begin(Lnet/neoforged/neoforge/client/model/generators/ModelBuilder;Lnet/neoforged/neoforge/common/data/ExistingFileHelper;)Lnet/neoforged/neoforge/client/model/generators/loaders/CompositeModelBuilder;: ❗ API method was removed
  • net/neoforged/neoforge/client/model/generators/loaders/ItemLayerModelBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ItemModelProvider
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelFile$UncheckedModelFile
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/CustomLoaderBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/VariantBlockStateBuilder$PartialBlockstate
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ConfiguredModel
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/VariantBlockStateBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ItemModelBuilder$OverrideBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/BlockStateProvider
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelFile$ExistingModelFile
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelProvider
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ItemModelBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/IGeneratedBlockState
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$TransformsBuilder$TransformVecBuilder
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/BlockStateProvider$ConfiguredModelList
    • ❗ API class no longer exists
  • net/neoforged/neoforge/client/model/generators/ModelBuilder$FaceRotation
    • ❗ API class no longer exists

@ApexModder
Copy link
Contributor Author

This PR should now be ready for view but important note ExtendedModelTemplate.Builder may still get some major reworking to lessen the amount of nesting/.end calls.
Thinking of refactoring into lambda style rather than builder style.

Meaning that the following
ExtendedModelTemplate.builder().element().end()

would change to something like so
ExtendedModelTemplate.builder().element(element -> { })

@ApexModder ApexModder marked this pull request as ready for review December 7, 2024 01:17
@neoforged-automation
Copy link

@ApexModder, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation
Copy link

@ApexModder, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation
Copy link

@ApexModder, this pull request has conflicts, please resolve them for this PR to move forward.

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.

A couple more comments, primarily about documentation.
When these are adressed, this PR is good to go from my end. The approval and merge has to be done by someone else as this PR adds code I wrote.

Add jdoc to `CustomLoaderBuilder#copy` stating that it must a deep-copy of the current builder instance
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.

Just some quick comments based on my previous ones.

@ApexModder ApexModder dismissed Matyrobbrt’s stale review December 22, 2024 21:30

Review went stale and requested changes were applied

@XFactHD XFactHD removed the request for review from Matyrobbrt December 22, 2024 21:31
@sciwhiz12 sciwhiz12 added the last call Planned to be resolved by the end of the week, awaiting any last-minute comments label Dec 23, 2024
@ApexModder ApexModder merged commit e613b59 into neoforged:1.21.x Dec 24, 2024
6 checks passed
@ApexModder ApexModder deleted the pr/vanilla-datagen-21.4 branch December 24, 2024 12:01
@neoforged-releases
Copy link

🚀 This PR has been released as NeoForge version 21.4.41-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 keep rebased Add this label to a PR to keep it rebased continuously automatically last call Planned to be resolved by the end of the week, awaiting any last-minute comments
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[1.21.4] Missing json files when generating Item Models
8 participants