Class B3DLoader.ModelWrapper
- java.lang.Object
-
- net.minecraftforge.client.model.b3d.B3DLoader.ModelWrapper
-
- All Implemented Interfaces:
IUnbakedModel
,IForgeUnbakedModel
- Enclosing class:
- B3DLoader
private static final class B3DLoader.ModelWrapper extends java.lang.Object implements IUnbakedModel
-
-
Field Summary
Fields Modifier and Type Field Description private int
defaultKey
private boolean
gui3d
private boolean
isSideLit
private com.google.common.collect.ImmutableSet<java.lang.String>
meshes
private B3DModel
model
private ResourceLocation
modelLocation
private boolean
smooth
private com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String>
textures
-
Constructor Summary
Constructors Constructor Description ModelWrapper(ResourceLocation modelLocation, B3DModel model, com.google.common.collect.ImmutableSet<java.lang.String> meshes, boolean smooth, boolean gui3d, boolean isSideLit, int defaultKey)
ModelWrapper(ResourceLocation modelLocation, B3DModel model, com.google.common.collect.ImmutableSet<java.lang.String> meshes, boolean smooth, boolean gui3d, boolean isSideLit, int defaultKey, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IBakedModel
bake(ModelBakery bakery, java.util.function.Function<RenderMaterial,TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation)
private static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String>
buildTextures(java.util.List<B3DModel.Texture> textures)
java.util.Optional<IClip>
getClip(java.lang.String name)
Retrieves information about an animation clip in the model.IModelTransform
getDefaultState()
java.util.Collection<ResourceLocation>
getDependencies()
private static java.lang.String
getLocation(java.lang.String path)
java.util.Collection<RenderMaterial>
getMaterials(java.util.function.Function<ResourceLocation,IUnbakedModel> modelGetter, java.util.Set<com.mojang.datafixers.util.Pair<java.lang.String,java.lang.String>> missingTextureErrors)
B3DLoader.ModelWrapper
gui3d(boolean value)
B3DLoader.ModelWrapper
process(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> data)
B3DLoader.ModelWrapper
retexture(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures)
B3DLoader.ModelWrapper
smoothLighting(boolean value)
-
-
-
Field Detail
-
modelLocation
private final ResourceLocation modelLocation
-
model
private final B3DModel model
-
meshes
private final com.google.common.collect.ImmutableSet<java.lang.String> meshes
-
textures
private final com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures
-
smooth
private final boolean smooth
-
gui3d
private final boolean gui3d
-
isSideLit
private final boolean isSideLit
-
defaultKey
private final int defaultKey
-
-
Constructor Detail
-
ModelWrapper
public ModelWrapper(ResourceLocation modelLocation, B3DModel model, com.google.common.collect.ImmutableSet<java.lang.String> meshes, boolean smooth, boolean gui3d, boolean isSideLit, int defaultKey)
-
ModelWrapper
public ModelWrapper(ResourceLocation modelLocation, B3DModel model, com.google.common.collect.ImmutableSet<java.lang.String> meshes, boolean smooth, boolean gui3d, boolean isSideLit, int defaultKey, com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures)
-
-
Method Detail
-
buildTextures
private static com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> buildTextures(java.util.List<B3DModel.Texture> textures)
-
getLocation
private static java.lang.String getLocation(java.lang.String path)
-
getMaterials
public java.util.Collection<RenderMaterial> getMaterials(java.util.function.Function<ResourceLocation,IUnbakedModel> modelGetter, java.util.Set<com.mojang.datafixers.util.Pair<java.lang.String,java.lang.String>> missingTextureErrors)
- Specified by:
getMaterials
in interfaceIUnbakedModel
-
getDependencies
public java.util.Collection<ResourceLocation> getDependencies()
- Specified by:
getDependencies
in interfaceIUnbakedModel
-
bake
@Nullable public IBakedModel bake(ModelBakery bakery, java.util.function.Function<RenderMaterial,TextureAtlasSprite> spriteGetter, IModelTransform modelTransform, ResourceLocation modelLocation)
- Specified by:
bake
in interfaceIUnbakedModel
-
retexture
public B3DLoader.ModelWrapper retexture(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> textures)
-
process
public B3DLoader.ModelWrapper process(com.google.common.collect.ImmutableMap<java.lang.String,java.lang.String> data)
-
getClip
public java.util.Optional<IClip> getClip(java.lang.String name)
Description copied from interface:IForgeUnbakedModel
Retrieves information about an animation clip in the model.- Specified by:
getClip
in interfaceIForgeUnbakedModel
- Parameters:
name
- The clip name- Returns:
-
getDefaultState
public IModelTransform getDefaultState()
-
smoothLighting
public B3DLoader.ModelWrapper smoothLighting(boolean value)
-
gui3d
public B3DLoader.ModelWrapper gui3d(boolean value)
-
-