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.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.render.model.UnbakedModel
UnbakedModel.Resolver
-
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) void
resolve
(UnbakedModel.Resolver resolver)
-
Constructor Details
-
DelegatingUnbakedModel
Constructs a new delegating model.- Parameters:
delegate
- The identifier of the underlying baked model.
-
-
Method Details
-
resolve
- Specified by:
resolve
in interfaceUnbakedModel
-
bake
@Nullable public @Nullable BakedModel bake(Baker baker, Function<SpriteIdentifier, Sprite> textureGetter, ModelBakeSettings rotationContainer) - Specified by:
bake
in interfaceUnbakedModel
-