Class CustomLoaderBuilder
java.lang.Object
net.neoforged.neoforge.client.model.generators.template.CustomLoaderBuilder
- Direct Known Subclasses:
CompositeModelBuilder
,ObjModelBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
private static final ResourceLocation
protected final ResourceLocation
private boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CustomLoaderBuilder
(ResourceLocation loaderId, boolean allowInlineElements) -
Method Summary
Modifier and TypeMethodDescription(package private) final CustomLoaderBuilder
copy()
protected abstract CustomLoaderBuilder
Returns 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 void
serializeNestedTemplate
(ModelTemplate template, TextureMapping textures, Consumer<com.google.gson.JsonElement> consumer) com.google.gson.JsonObject
toJson
(com.google.gson.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 associatedUnbakedModelLoader
allowInlineElements
- 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
public com.google.gson.JsonObject toJson(com.google.gson.JsonObject json) -
serializeNestedTemplate
protected static void serializeNestedTemplate(ModelTemplate template, TextureMapping textures, Consumer<com.google.gson.JsonElement> consumer)
-