Package net.minecraftforge.client.model
Class ItemLayerModel
java.lang.Object
net.minecraftforge.client.model.ItemLayerModel
- All Implemented Interfaces:
IUnbakedGeometry<ItemLayerModel>
Forge reimplementation of vanilla's
ItemModelGenerator
, i.e. builtin/generated models with some tweaks:
- Represented as IUnbakedGeometry
so it can be baked as usual instead of being special-cased
- Not limited to an arbitrary number of layers (5)
- Support for per-layer render types-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final it.unimi.dsi.fastutil.ints.IntSet
private static final org.apache.logging.log4j.Logger
private final boolean
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<ResourceLocation>
private @Nullable com.google.common.collect.ImmutableList<Material>
-
Constructor Summary
ModifierConstructorDescriptionItemLayerModel
(@Nullable com.google.common.collect.ImmutableList<Material> textures, it.unimi.dsi.fastutil.ints.IntSet emissiveLayers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ResourceLocation> renderTypeNames) private
ItemLayerModel
(@Nullable com.google.common.collect.ImmutableList<Material> textures, it.unimi.dsi.fastutil.ints.IntSet emissiveLayers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ResourceLocation> renderTypeNames, boolean deprecatedLoader, boolean logWarning) -
Method Summary
Modifier and TypeMethodDescriptionbake
(IGeometryBakingContext context, ModelBakery bakery, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation) getMaterials
(IGeometryBakingContext context, Function<ResourceLocation, UnbakedModel> modelGetter, Set<com.mojang.datafixers.util.Pair<String, String>> missingTextureErrors) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.client.model.geometry.IUnbakedGeometry
getConfigurableComponentNames
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
textures
-
emissiveLayers
private final it.unimi.dsi.fastutil.ints.IntSet emissiveLayers -
renderTypeNames
-
deprecatedLoader
private final boolean deprecatedLoader -
logWarning
private final boolean logWarning
-
-
Constructor Details
-
ItemLayerModel
public ItemLayerModel(@Nullable @Nullable com.google.common.collect.ImmutableList<Material> textures, it.unimi.dsi.fastutil.ints.IntSet emissiveLayers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ResourceLocation> renderTypeNames) -
ItemLayerModel
private ItemLayerModel(@Nullable @Nullable com.google.common.collect.ImmutableList<Material> textures, it.unimi.dsi.fastutil.ints.IntSet emissiveLayers, it.unimi.dsi.fastutil.ints.Int2ObjectMap<ResourceLocation> renderTypeNames, boolean deprecatedLoader, 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<ItemLayerModel>
-
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<ItemLayerModel>
-