Class DelegatingUnbakedModel
java.lang.Object
net.fabricmc.fabric.api.client.model.loading.v1.DelegatingUnbakedModel
- All Implemented Interfaces:
UnbakedModel
An unbaked model that returns another
BakedModel
at bake time.
This allows multiple UnbakedModel
s to share the same BakedModel
instance
and prevents baking the same model multiple times.-
Constructor Summary
ConstructorDescriptionDelegatingUnbakedModel
(Identifier delegate) Constructs a new delegating model. -
Method Summary
Modifier and TypeMethodDescription@Nullable BakedModel
bake
(Baker baker, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) void
setParents
(Function<Identifier, UnbakedModel> modelLoader)
-
Constructor Details
-
DelegatingUnbakedModel
Constructs a new delegating model.- Parameters:
delegate
- The identifier (can be aModelIdentifier
) of the underlying baked model.
-
-
Method Details
-
getModelDependencies
- Specified by:
getModelDependencies
in interfaceUnbakedModel
-
setParents
- Specified by:
setParents
in interfaceUnbakedModel
-
bake
@Nullable public @Nullable BakedModel bake(Baker baker, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer, Identifier modelId) - Specified by:
bake
in interfaceUnbakedModel
-