Class CustomLoaderBuilder
java.lang.Object
net.neoforged.neoforge.client.model.generators.template.CustomLoaderBuilder
- Direct Known Subclasses:
CompositeModelBuilder,ObjModelBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprivate static final ResourceLocationprotected final ResourceLocationprivate boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCustomLoaderBuilder(ResourceLocation loaderId, boolean allowInlineElements) -
Method Summary
Modifier and TypeMethodDescription(package private) final CustomLoaderBuildercopy()protected abstract CustomLoaderBuilderReturns a deep-copy of this builder in order to maintain the immutability nature ofModelTemplate.optional()Mark the custom loader as optional for this model to allow it to be loaded through vanilla paths if the loader is not presentprotected static voidserializeNestedTemplate(ModelTemplate template, TextureMapping textures, Consumer<JsonElement> consumer) toJson(JsonObject json) visibility(String partName, boolean show)
-
Field Details
-
DUMMY
-
loaderId
-
visibility
-
allowInlineElements
protected final boolean allowInlineElements -
optional
private boolean optional
-
-
Constructor Details
-
CustomLoaderBuilder
- Parameters:
loaderId- The ID of the associatedUnbakedModelLoaderallowInlineElements- Whether the loader supports inline vanilla elements and as such can fall back to vanilla loading with some degradation if the loader does not exist and is marked as optional in the model
-
-
Method Details
-
visibility
-
optional
Mark the custom loader as optional for this model to allow it to be loaded through vanilla paths if the loader is not present -
copy
-
copyInternal
Returns a deep-copy of this builder in order to maintain the immutability nature ofModelTemplate. -
toJson
-
serializeNestedTemplate
protected static void serializeNestedTemplate(ModelTemplate template, TextureMapping textures, Consumer<JsonElement> consumer)
-