Class DelegateBakedModel
java.lang.Object
net.minecraft.client.resources.model.DelegateBakedModel
- All Implemented Interfaces:
BakedModel,IBakedModelExtension
- Direct Known Subclasses:
MultiPartBakedModel,WeightedBakedModel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyTransform(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_371320_, Direction p_371369_, RandomSource p_371947_) Deprecated.getQuads(BlockState p_371320_, Direction p_371369_, RandomSource p_371947_, ModelData modelData, RenderType renderType) A nullRenderTypeis used for the breaking overlay as well as non-standard rendering, so models should return all their quads.getRenderPasses(ItemStack itemStack) Gets an ordered list of baked models used to render this model as an item.getRenderType(ItemStack itemStack) Gets therender typeto use when drawing this item.getRenderTypes(BlockState state, RandomSource rand, ModelData data) Gets the set ofrender typesto use when drawing this block in the level.Deprecated.booleanisGui3d()booleanuseAmbientOcclusion(BlockState state, ModelData modelData, RenderType renderType) Controls the AO behavior for all quads of this model.boolean
-
Field Details
-
parent
-
-
Constructor Details
-
DelegateBakedModel
-
-
Method Details
-
getQuads
@Deprecated public List<BakedQuad> getQuads(@Nullable BlockState p_371320_, @Nullable Direction p_371369_, RandomSource p_371947_) Deprecated.- Specified by:
getQuadsin interfaceBakedModel
-
getQuads
public List<BakedQuad> getQuads(@Nullable BlockState p_371320_, @Nullable Direction p_371369_, RandomSource p_371947_, 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
-
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
-
isGui3d
public boolean isGui3d()- Specified by:
isGui3din interfaceBakedModel
-
usesBlockLight
public boolean usesBlockLight()- Specified by:
usesBlockLightin interfaceBakedModel
-
getParticleIcon
Deprecated.- Specified by:
getParticleIconin interfaceBakedModel
-
getParticleIcon
- Specified by:
getParticleIconin interfaceIBakedModelExtension
-
getTransforms
Deprecated.- Specified by:
getTransformsin interfaceBakedModel
-
applyTransform
public void 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
-
getModelData
public ModelData getModelData(BlockAndTintGetter level, BlockPos pos, BlockState state, ModelData modelData) - Specified by:
getModelDatain interfaceIBakedModelExtension
-
getRenderTypes
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
-
getRenderType
Description copied from interface:IBakedModelExtensionGets therender typeto use when drawing this item. All render types using theDefaultVertexFormat.NEW_ENTITYformat are supported.This method will only be called on the models returned by
IBakedModelExtension.getRenderPasses(ItemStack).By default, defers query to
ItemBlockRenderTypes.- Specified by:
getRenderTypein interfaceIBakedModelExtension- See Also:
-
getRenderPasses
Description copied from interface:IBakedModelExtensionGets an ordered list of baked models used to render this model as an item. Each of those models' render type will be queried viaIBakedModelExtension.getRenderType(ItemStack).By default, returns the model itself.
- Specified by:
getRenderPassesin interfaceIBakedModelExtension- See Also:
-