Package net.minecraftforge.client.model
Class CompositeModel
java.lang.Object
net.minecraftforge.client.model.CompositeModel
- All Implemented Interfaces:
IUnbakedGeometry<CompositeModel>
A model composed of several named children.
These respect component visibility as specified in IGeometryBakingContext
and can additionally be provided
with an item-specific render ordering, for multi-pass arrangements.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
A model data container which stores data for child components.static final class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableMap<String,
BlockModel> private final com.google.common.collect.ImmutableList<String>
private static final org.apache.logging.log4j.Logger
private final boolean
-
Constructor Summary
ModifierConstructorDescriptionCompositeModel
(com.google.common.collect.ImmutableMap<String, BlockModel> children, com.google.common.collect.ImmutableList<String> itemPasses) private
CompositeModel
(com.google.common.collect.ImmutableMap<String, BlockModel> children, com.google.common.collect.ImmutableList<String> itemPasses, boolean logWarning) -
Method Summary
Modifier and TypeMethodDescriptionbake
(IGeometryBakingContext context, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) Returns a set of all the components whose visibility may be configured viaIGeometryBakingContext
.void
resolveParents
(Function<ResourceLocation, UnbakedModel> modelGetter, IGeometryBakingContext context) Resolve parents of nestedBlockModel
s which are later used inIUnbakedGeometry.bake(IGeometryBakingContext, ModelBaker, Function, ModelState, ItemOverrides, ResourceLocation)
viaBlockModel.resolveParents(Function)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
children
-
itemPasses
-
logWarning
private final boolean logWarning
-
-
Constructor Details
-
CompositeModel
public CompositeModel(com.google.common.collect.ImmutableMap<String, BlockModel> children, com.google.common.collect.ImmutableList<String> itemPasses) -
CompositeModel
private CompositeModel(com.google.common.collect.ImmutableMap<String, BlockModel> children, com.google.common.collect.ImmutableList<String> itemPasses, boolean logWarning)
-
-
Method Details
-
bake
public BakedModel bake(IGeometryBakingContext context, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) - Specified by:
bake
in interfaceIUnbakedGeometry<CompositeModel>
-
resolveParents
public void resolveParents(Function<ResourceLocation, UnbakedModel> modelGetter, IGeometryBakingContext context) Description copied from interface:IUnbakedGeometry
Resolve parents of nestedBlockModel
s which are later used inIUnbakedGeometry.bake(IGeometryBakingContext, ModelBaker, Function, ModelState, ItemOverrides, ResourceLocation)
viaBlockModel.resolveParents(Function)
- Specified by:
resolveParents
in interfaceIUnbakedGeometry<CompositeModel>
-
getConfigurableComponentNames
Description copied from interface:IUnbakedGeometry
Returns a set of all the components whose visibility may be configured viaIGeometryBakingContext
.- Specified by:
getConfigurableComponentNames
in interfaceIUnbakedGeometry<CompositeModel>
- Returns:
- a set of all the components whose visibility may be configured via
IGeometryBakingContext
-