public final class ItemLayerModel extends java.lang.Object implements IUnbakedModel
ItemModelGenerator
, i.e. builtin/generated models,
with the following changes:
- Represented as a true IUnbakedModel
so it can be baked as usual instead of using
special-case logic like vanilla does.
- Various fixes in the baking logic.
- Not limited to 4 layers maximum.Modifier and Type | Class and Description |
---|---|
static class |
ItemLayerModel.Loader |
Modifier and Type | Field and Description |
---|---|
static ItemLayerModel |
INSTANCE |
Constructor and Description |
---|
ItemLayerModel(com.google.common.collect.ImmutableList<ResourceLocation> textures) |
ItemLayerModel(com.google.common.collect.ImmutableList<ResourceLocation> textures,
ItemOverrideList overrides) |
ItemLayerModel(ModelBakery bakery,
BlockModel model,
VertexFormat format) |
Modifier and Type | Method and Description |
---|---|
IBakedModel |
bake(ModelBakery bakery,
java.util.function.Function<ResourceLocation,TextureAtlasSprite> spriteGetter,
ISprite sprite,
VertexFormat format) |
java.util.Collection<ResourceLocation> |
getDependencies() |
static com.google.common.collect.ImmutableList<BakedQuad> |
getQuadsForSprite(int tint,
TextureAtlasSprite sprite,
VertexFormat format,
java.util.Optional<TRSRTransformation> transform) |
java.util.Collection<ResourceLocation> |
getTextures(java.util.function.Function<ResourceLocation,IUnbakedModel> modelGetter,
java.util.Set<java.lang.String> missingTextureErrors) |
ItemLayerModel |
retexture(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures)
Applies new textures to the model.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bake
getDefaultState, gui3d, process, smoothLighting
getClip
public static final ItemLayerModel INSTANCE
public ItemLayerModel(com.google.common.collect.ImmutableList<ResourceLocation> textures)
public ItemLayerModel(com.google.common.collect.ImmutableList<ResourceLocation> textures, ItemOverrideList overrides)
public ItemLayerModel(ModelBakery bakery, BlockModel model, VertexFormat format)
public java.util.Collection<ResourceLocation> getTextures(java.util.function.Function<ResourceLocation,IUnbakedModel> modelGetter, java.util.Set<java.lang.String> missingTextureErrors)
getTextures
in interface IUnbakedModel
public java.util.Collection<ResourceLocation> getDependencies()
getDependencies
in interface IUnbakedModel
public ItemLayerModel retexture(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures)
IModel
retexture
in interface IModel<IUnbakedModel>
textures
- New@Nullable public IBakedModel bake(ModelBakery bakery, java.util.function.Function<ResourceLocation,TextureAtlasSprite> spriteGetter, ISprite sprite, VertexFormat format)
bake
in interface IForgeUnbakedModel
spriteGetter
- Where textures will be looked up when bakingsprite
- Transforms to apply while baking. Usually will be an instance of IModelState
.public static com.google.common.collect.ImmutableList<BakedQuad> getQuadsForSprite(int tint, TextureAtlasSprite sprite, VertexFormat format, java.util.Optional<TRSRTransformation> transform)