Interface IUnbakedModelExtension
- All Known Subinterfaces:
ExtendedUnbakedModel,UnbakedModel
- All Known Implementing Classes:
AbstractSimpleUnbakedModel,AbstractUnbakedModel,BlockModel,DelegateUnbakedModel,EmptyModel,ItemModelGenerator,ObjModel,UnbakedCompositeModel
public interface IUnbakedModelExtension
Extension type for the
UnbakedModel interface.-
Method Summary
Modifier and TypeMethodDescriptiondefault BakedModelbake(TextureSlots textures, ModelBaker baker, ModelState modelState, boolean useAmbientOcclusion, boolean usesBlockLight, ItemTransforms itemTransforms, ContextMap additionalProperties) bakeoverride with additional context.private static voidfillAdditionalProperties(@Nullable UnbakedModel model, ContextMap.Builder propertiesBuilder) default voidfillAdditionalProperties(ContextMap.Builder propertiesBuilder) Appends additional properties for this model to the builder.static ContextMapgetTopAdditionalProperties(UnbakedModel topModel) Resolves additional properties by walking the model child-parent chain and callingfillAdditionalProperties(ContextMap.Builder).private UnbakedModelself()
-
Method Details
-
self
-
bake
default BakedModel bake(TextureSlots textures, ModelBaker baker, ModelState modelState, boolean useAmbientOcclusion, boolean usesBlockLight, ItemTransforms itemTransforms, ContextMap additionalProperties) bakeoverride with additional context. Consider inheriting fromExtendedUnbakedModelwhich overrides the vanillabakemethod.- 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)
-