Package net.minecraftforge.client.model
Class CompositeModel
- java.lang.Object
-
- net.minecraftforge.client.model.CompositeModel
-
- All Implemented Interfaces:
IBakedModel
,IForgeBakedModel
,IDynamicBakedModel
public class CompositeModel extends java.lang.Object implements IDynamicBakedModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CompositeModel.CompositeModelData
A model data container which stores data for child components.static class
CompositeModel.Geometry
static class
CompositeModel.Loader
private static class
CompositeModel.ModelDataWrapper
Wrapper for an IModelData instance which allows forwarding queries to the parent, but stores any new/modified values itself, avoiding modifications to the parent.private static class
CompositeModel.Submodel
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.collect.ImmutableMap<java.lang.String,IBakedModel>
bakedParts
private boolean
isAmbientOcclusion
private boolean
isGui3d
private boolean
isSideLit
private ItemOverrideList
overrides
private TextureAtlasSprite
particle
private IModelTransform
transforms
-
Constructor Summary
Constructors Constructor Description CompositeModel(boolean isGui3d, boolean isSideLit, boolean isAmbientOcclusion, TextureAtlasSprite particle, com.google.common.collect.ImmutableMap<java.lang.String,IBakedModel> bakedParts, IModelTransform combinedTransform, ItemOverrideList overrides)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
doesHandlePerspectives()
Override to tell the new model loader that it shouldn't wrap this modelIModelData
getModelData(IBlockDisplayReader world, BlockPos pos, BlockState state, IModelData tileData)
ItemOverrideList
getOverrides()
IBakedModel
getPart(java.lang.String name)
TextureAtlasSprite
getParticleIcon()
java.util.List<BakedQuad>
getQuads(BlockState state, Direction side, java.util.Random rand, IModelData extraData)
IBakedModel
handlePerspective(ItemCameraTransforms.TransformType cameraTransformType, MatrixStack mat)
boolean
isCustomRenderer()
boolean
isGui3d()
boolean
useAmbientOcclusion()
boolean
usesBlockLight()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.client.renderer.model.IBakedModel
getTransforms
-
Methods inherited from interface net.minecraftforge.client.model.data.IDynamicBakedModel
getQuads
-
Methods inherited from interface net.minecraftforge.client.extensions.IForgeBakedModel
getBakedModel, getLayerModels, getParticleTexture, isAmbientOcclusion, isLayered
-
-
-
-
Field Detail
-
bakedParts
private final com.google.common.collect.ImmutableMap<java.lang.String,IBakedModel> bakedParts
-
isAmbientOcclusion
private final boolean isAmbientOcclusion
-
isGui3d
private final boolean isGui3d
-
isSideLit
private final boolean isSideLit
-
particle
private final TextureAtlasSprite particle
-
overrides
private final ItemOverrideList overrides
-
transforms
private final IModelTransform transforms
-
-
Constructor Detail
-
CompositeModel
public CompositeModel(boolean isGui3d, boolean isSideLit, boolean isAmbientOcclusion, TextureAtlasSprite particle, com.google.common.collect.ImmutableMap<java.lang.String,IBakedModel> bakedParts, IModelTransform combinedTransform, ItemOverrideList overrides)
-
-
Method Detail
-
getQuads
@Nonnull public java.util.List<BakedQuad> getQuads(@Nullable BlockState state, @Nullable Direction side, @Nonnull java.util.Random rand, @Nonnull IModelData extraData)
- Specified by:
getQuads
in interfaceIDynamicBakedModel
- Specified by:
getQuads
in interfaceIForgeBakedModel
-
getModelData
@Nonnull public IModelData getModelData(@Nonnull IBlockDisplayReader world, @Nonnull BlockPos pos, @Nonnull BlockState state, @Nonnull IModelData tileData)
- Specified by:
getModelData
in interfaceIForgeBakedModel
-
useAmbientOcclusion
public boolean useAmbientOcclusion()
- Specified by:
useAmbientOcclusion
in interfaceIBakedModel
-
isGui3d
public boolean isGui3d()
- Specified by:
isGui3d
in interfaceIBakedModel
-
usesBlockLight
public boolean usesBlockLight()
- Specified by:
usesBlockLight
in interfaceIBakedModel
-
isCustomRenderer
public boolean isCustomRenderer()
- Specified by:
isCustomRenderer
in interfaceIBakedModel
-
getParticleIcon
public TextureAtlasSprite getParticleIcon()
- Specified by:
getParticleIcon
in interfaceIBakedModel
-
getOverrides
public ItemOverrideList getOverrides()
- Specified by:
getOverrides
in interfaceIBakedModel
-
doesHandlePerspectives
public boolean doesHandlePerspectives()
Description copied from interface:IForgeBakedModel
Override to tell the new model loader that it shouldn't wrap this model- Specified by:
doesHandlePerspectives
in interfaceIForgeBakedModel
-
handlePerspective
public IBakedModel handlePerspective(ItemCameraTransforms.TransformType cameraTransformType, MatrixStack mat)
- Specified by:
handlePerspective
in interfaceIForgeBakedModel
-
getPart
@Nullable public IBakedModel getPart(java.lang.String name)
-
-