Class CustomLoaderBuilder<T extends ModelBuilder<T>>
java.lang.Object
net.neoforged.neoforge.client.model.generators.CustomLoaderBuilder<T>
- Direct Known Subclasses:
CompositeModelBuilder
,DynamicFluidContainerModelBuilder
,ItemLayerModelBuilder
,ObjModelBuilder
,SeparateTransformsModelBuilder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final boolean
protected final ExistingFileHelper
protected final ResourceLocation
private boolean
protected final T
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CustomLoaderBuilder
(ResourceLocation loaderId, T parent, ExistingFileHelper existingFileHelper, boolean allowInlineElements) -
Method Summary
Modifier and TypeMethodDescriptionend()
optional()
Mark the custom loader as optional for this model to allow it to be loaded through vanilla paths if the loader is not presentcom.google.gson.JsonObject
toJson
(com.google.gson.JsonObject json) visibility
(String partName, boolean show)
-
Field Details
-
loaderId
-
parent
-
existingFileHelper
-
visibility
-
allowInlineElements
protected final boolean allowInlineElements -
optional
private boolean optional
-
-
Constructor Details
-
CustomLoaderBuilder
protected CustomLoaderBuilder(ResourceLocation loaderId, T parent, ExistingFileHelper existingFileHelper, boolean allowInlineElements) - Parameters:
loaderId
- The ID of the associatedIGeometryLoader
parent
- The parentModelBuilder
existingFileHelper
- TheExistingFileHelper
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 -
end
-
toJson
public com.google.gson.JsonObject toJson(com.google.gson.JsonObject json)
-