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, ModelBakery bakery, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) Returns a set of all the components whose visibility may be configured viaIGeometryBakingContext
.getMaterials
(IGeometryBakingContext context, Function<ResourceLocation, UnbakedModel> modelGetter, Set<com.mojang.datafixers.util.Pair<String, String>> missingTextureErrors)
-
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, ModelBakery bakery, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) - Specified by:
bake
in interfaceIUnbakedGeometry<CompositeModel>
-
getMaterials
public Collection<Material> getMaterials(IGeometryBakingContext context, Function<ResourceLocation, UnbakedModel> modelGetter, Set<com.mojang.datafixers.util.Pair<String, String>> missingTextureErrors) - Specified by:
getMaterials
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
-