Interface IUnbakedModelExtension
- All Known Subinterfaces:
ExtendedUnbakedModel
,UnbakedModel
- All Known Implementing Classes:
AbstractSimpleUnbakedModel
,AbstractUnbakedModel
,BlockModel
,DelegateUnbakedModel
,EmptyModel
,FullPotsAccessorDemo.ClientHandler.DioritePotModelGeometry
,ItemModelGenerator
,NewModelLoaderTest.TestModel
,ObjModel
,UnbakedCompositeModel
public interface IUnbakedModelExtension
Extension type for the
UnbakedModel
interface.-
Method Summary
Modifier and TypeMethodDescriptiondefault BakedModel
bake
(TextureSlots textures, ModelBaker baker, ModelState modelState, boolean useAmbientOcclusion, boolean usesBlockLight, ItemTransforms itemTransforms, ContextMap additionalProperties) bake
override with additional context.private static void
fillAdditionalProperties
(@Nullable UnbakedModel model, ContextMap.Builder propertiesBuilder) default void
fillAdditionalProperties
(ContextMap.Builder propertiesBuilder) Appends additional properties for this model to the builder.static ContextMap
getTopAdditionalProperties
(UnbakedModel topModel) Resolves additional properties by walking the model child-parent chain and callingfillAdditionalProperties(ContextMap.Builder)
.private UnbakedModel
self()
-
Method Details
-
self
-
bake
default BakedModel bake(TextureSlots textures, ModelBaker baker, ModelState modelState, boolean useAmbientOcclusion, boolean usesBlockLight, ItemTransforms itemTransforms, ContextMap additionalProperties) bake
override with additional context. Consider inheriting fromExtendedUnbakedModel
which overrides the vanillabake
method.- Parameters:
additionalProperties
- additional properties provided by NeoForge or mods
-
fillAdditionalProperties
Appends additional properties for this model to the builder.This method will already have been called on the parent models. It can modify the properties added by a parent model and/or add its own. This ensures that the properties are merged across the model parent-child chain.
The context map containing all the properties will be passed as the last parameter to
bake(TextureSlots, ModelBaker, ModelState, boolean, boolean, ItemTransforms, ContextMap)
.- See Also:
-
getTopAdditionalProperties
Resolves additional properties by walking the model child-parent chain and callingfillAdditionalProperties(ContextMap.Builder)
. -
fillAdditionalProperties
private static void fillAdditionalProperties(@Nullable @Nullable UnbakedModel model, ContextMap.Builder propertiesBuilder)
-