Class CompositeModelBuilder
java.lang.Object
net.neoforged.neoforge.client.model.generators.template.CustomLoaderBuilder
net.neoforged.neoforge.client.model.generators.loaders.CompositeModelBuilder
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<String, com.mojang.datafixers.util.Either<Identifier, CompositeModelBuilder.InlineChild>> Fields inherited from class CustomLoaderBuilder
allowInlineElements, loaderId, visibility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchild(String name, Identifier model) Add a child model by reference.protected CustomLoaderBuilderReturns a deep-copy of this builder in order to maintain the immutability nature ofModelTemplate.inlineChild(String name, ModelTemplate template, TextureMapping textures) Add an inline child model.itemRenderOrder(String... names) toJson(JsonObject json) Methods inherited from class CustomLoaderBuilder
optional, serializeNestedTemplate, visibility
-
Field Details
-
childModels
private final Map<String, com.mojang.datafixers.util.Either<Identifier, CompositeModelBuilder.InlineChild>> childModels -
itemRenderOrder
-
-
Constructor Details
-
CompositeModelBuilder
public CompositeModelBuilder()
-
-
Method Details
-
child
Add a child model by reference. The child model will be loaded from a separate file at the given location- Parameters:
name- The part name of the childmodel- The child model's path relative to the models folder
-
inlineChild
public CompositeModelBuilder inlineChild(String name, ModelTemplate template, TextureMapping textures) Add an inline child model. The child model will be loaded from a nested object in the same JSON file- Parameters:
name- The part name of the childtemplate- TheModelTemplateto create the child model fromtextures- TheTextureMappingthis child model uses
-
itemRenderOrder
-
copyInternal
Description copied from class:CustomLoaderBuilderReturns a deep-copy of this builder in order to maintain the immutability nature ofModelTemplate.- Specified by:
copyInternalin classCustomLoaderBuilder
-
toJson
- Overrides:
toJsonin classCustomLoaderBuilder
-