Class MultiPartBakedModel
java.lang.Object
net.minecraft.client.resources.model.MultiPartBakedModel
- All Implemented Interfaces:
BakedModel
,IBakedModelExtension
,IDynamicBakedModel
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final BakedModel
protected final boolean
protected final boolean
protected final ItemOverrides
protected final TextureAtlasSprite
private final Map<BlockState,
BitSet> private final List<org.apache.commons.lang3.tuple.Pair<Predicate<BlockState>,
BakedModel>> protected final ItemTransforms
protected final boolean
-
Constructor Summary
ConstructorDescriptionMultiPartBakedModel
(List<org.apache.commons.lang3.tuple.Pair<Predicate<BlockState>, BakedModel>> p_119462_) -
Method Summary
Modifier and TypeMethodDescriptionapplyTransform
(ItemDisplayContext transformType, PoseStack poseStack, boolean applyLeftHandTransform) Applies a transform for the giveninvalid @link
ItemTransforms.TransformType
applyLeftHandTransform
, and returns the model to be rendered.getModelData
(BlockAndTintGetter level, BlockPos pos, BlockState state, ModelData modelData) Deprecated.getParticleIcon
(ModelData modelData) getQuads
(BlockState p_235050_, Direction p_235051_, RandomSource p_235052_, ModelData modelData, RenderType renderType) A nullRenderType
is used for the breaking overlay as well as non-standard rendering, so models should return all their quads.getRenderTypes
(@NotNull BlockState state, @NotNull RandomSource rand, ModelData data) Gets the set ofrender types
to use when drawing this block in the level.getSelectors
(BlockState p_235050_) Deprecated.boolean
boolean
isGui3d()
boolean
boolean
useAmbientOcclusion
(BlockState state) boolean
useAmbientOcclusion
(BlockState state, RenderType renderType) boolean
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.client.extensions.IBakedModelExtension
getRenderPasses, getRenderTypes
Methods inherited from interface net.neoforged.neoforge.client.model.IDynamicBakedModel
getQuads
-
Field Details
-
selectors
-
hasAmbientOcclusion
protected final boolean hasAmbientOcclusion -
isGui3d
protected final boolean isGui3d -
usesBlockLight
protected final boolean usesBlockLight -
particleIcon
-
transforms
-
overrides
-
selectorCache
-
defaultModel
-
-
Constructor Details
-
MultiPartBakedModel
public MultiPartBakedModel(List<org.apache.commons.lang3.tuple.Pair<Predicate<BlockState>, BakedModel>> p_119462_)
-
-
Method Details
-
getSelectors
-
getQuads
public List<BakedQuad> getQuads(@Nullable BlockState p_235050_, @Nullable Direction p_235051_, RandomSource p_235052_, ModelData modelData, @Nullable RenderType renderType) Description copied from interface:IBakedModelExtension
A nullRenderType
is used for the breaking overlay as well as non-standard rendering, so models should return all their quads.- Specified by:
getQuads
in interfaceIBakedModelExtension
- Specified by:
getQuads
in interfaceIDynamicBakedModel
-
useAmbientOcclusion
public boolean useAmbientOcclusion()- Specified by:
useAmbientOcclusion
in interfaceBakedModel
-
useAmbientOcclusion
- Specified by:
useAmbientOcclusion
in interfaceIBakedModelExtension
-
useAmbientOcclusion
- Specified by:
useAmbientOcclusion
in interfaceIBakedModelExtension
-
getModelData
public ModelData getModelData(BlockAndTintGetter level, BlockPos pos, BlockState state, ModelData modelData) - Specified by:
getModelData
in interfaceIBakedModelExtension
-
isGui3d
public boolean isGui3d()- Specified by:
isGui3d
in interfaceBakedModel
-
usesBlockLight
public boolean usesBlockLight()- Specified by:
usesBlockLight
in interfaceBakedModel
-
isCustomRenderer
public boolean isCustomRenderer()- Specified by:
isCustomRenderer
in interfaceBakedModel
-
getParticleIcon
Deprecated.- Specified by:
getParticleIcon
in interfaceBakedModel
-
getParticleIcon
- Specified by:
getParticleIcon
in interfaceIBakedModelExtension
-
getTransforms
Deprecated.- Specified by:
getTransforms
in interfaceBakedModel
-
applyTransform
public BakedModel applyTransform(ItemDisplayContext transformType, PoseStack poseStack, boolean applyLeftHandTransform) Description copied from interface:IBakedModelExtension
Applies a transform for the giveninvalid @link
ItemTransforms.TransformType
applyLeftHandTransform
, and returns the model to be rendered.- Specified by:
applyTransform
in interfaceIBakedModelExtension
-
getRenderTypes
public ChunkRenderTypeSet getRenderTypes(@NotNull @NotNull BlockState state, @NotNull @NotNull RandomSource rand, @NotNull ModelData data) Description copied from interface:IBakedModelExtension
Gets the set ofrender types
to use when drawing this block in the level. Supported types are those returned byRenderType.chunkBufferLayers()
.By default, defers query to
ItemBlockRenderTypes
.- Specified by:
getRenderTypes
in interfaceIBakedModelExtension
-
getOverrides
- Specified by:
getOverrides
in interfaceBakedModel
-