Class MultiPartBakedModel
java.lang.Object
net.minecraft.client.resources.model.MultiPartBakedModel
- All Implemented Interfaces:
BakedModel,IBakedModelExtension,IDynamicBakedModel
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BakedModelprotected final booleanprotected final booleanprotected final ItemOverridesprotected final TextureAtlasSpriteprivate final Map<BlockState, BitSet> private final List<org.apache.commons.lang3.tuple.Pair<Predicate<BlockState>, BakedModel>> protected final ItemTransformsprotected final boolean -
Constructor Summary
ConstructorsConstructorDescriptionMultiPartBakedModel(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 givenandinvalid reference
ItemTransforms.TransformTypeapplyLeftHandTransform, 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 nullRenderTypeis 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 typesto use when drawing this block in the level.getSelectors(BlockState p_235050_) Deprecated.booleanbooleanisGui3d()booleanuseAmbientOcclusion(BlockState state, ModelData modelData, RenderType renderType) Controls the AO behavior for all quads of this model.booleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.client.extensions.IBakedModelExtension
getRenderPasses, getRenderTypesMethods 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:IBakedModelExtensionA nullRenderTypeis used for the breaking overlay as well as non-standard rendering, so models should return all their quads.- Specified by:
getQuadsin interfaceIBakedModelExtension- Specified by:
getQuadsin interfaceIDynamicBakedModel
-
useAmbientOcclusion
public boolean useAmbientOcclusion()- Specified by:
useAmbientOcclusionin interfaceBakedModel
-
useAmbientOcclusion
Description copied from interface:IBakedModelExtensionControls the AO behavior for all quads of this model. The default behavior is to use AO unless the block emits light,TriState.TRUEandTriState.FALSEforce AO to be enabled and disabled respectively, regardless of the block emitting light or not.BakedQuad.hasAmbientOcclusion()can be used to disable AO for a specific quad even if this method says otherwise.This method cannot force AO if the global smooth lighting video setting is disabled.
- Specified by:
useAmbientOcclusionin interfaceIBakedModelExtension- Parameters:
state- the block state this model is being rendered formodelData- the model data used to render this modelrenderType- the render type the model is being rendered with- Returns:
TriState.TRUEto force-enable AO,TriState.FALSEto force-disable AO orTriState.DEFAULTto use vanilla AO behavior
-
getModelData
public ModelData getModelData(BlockAndTintGetter level, BlockPos pos, BlockState state, ModelData modelData) - Specified by:
getModelDatain interfaceIBakedModelExtension
-
isGui3d
public boolean isGui3d()- Specified by:
isGui3din interfaceBakedModel
-
usesBlockLight
public boolean usesBlockLight()- Specified by:
usesBlockLightin interfaceBakedModel
-
isCustomRenderer
public boolean isCustomRenderer()- Specified by:
isCustomRendererin interfaceBakedModel
-
getParticleIcon
Deprecated.- Specified by:
getParticleIconin interfaceBakedModel
-
getParticleIcon
- Specified by:
getParticleIconin interfaceIBakedModelExtension
-
getTransforms
Deprecated.- Specified by:
getTransformsin interfaceBakedModel
-
applyTransform
public BakedModel applyTransform(ItemDisplayContext transformType, PoseStack poseStack, boolean applyLeftHandTransform) Description copied from interface:IBakedModelExtensionApplies a transform for the givenandinvalid reference
ItemTransforms.TransformTypeapplyLeftHandTransform, and returns the model to be rendered.- Specified by:
applyTransformin interfaceIBakedModelExtension
-
getRenderTypes
public ChunkRenderTypeSet getRenderTypes(@NotNull @NotNull BlockState state, @NotNull @NotNull RandomSource rand, @NotNull ModelData data) Description copied from interface:IBakedModelExtensionGets the set ofrender typesto use when drawing this block in the level. Supported types are those returned byRenderType.chunkBufferLayers().By default, defers query to
ItemBlockRenderTypes.- Specified by:
getRenderTypesin interfaceIBakedModelExtension
-
getOverrides
- Specified by:
getOverridesin interfaceBakedModel
-