Class WeightedBakedModel
java.lang.Object
net.minecraft.client.resources.model.WeightedBakedModel
- All Implemented Interfaces:
BakedModel,IBakedModelExtension,IDynamicBakedModel
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<WeightedEntry.Wrapper<BakedModel>> private final intprivate final BakedModel -
Constructor Summary
Constructors -
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.getParticleIcon(ModelData modelData) getQuads(BlockState p_235058_, Direction p_235059_, RandomSource p_235060_, 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.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
getModelData, getRenderPasses, getRenderTypesMethods inherited from interface net.neoforged.neoforge.client.model.IDynamicBakedModel
getQuads
-
Field Details
-
totalWeight
private final int totalWeight -
list
-
wrapped
-
-
Constructor Details
-
WeightedBakedModel
-
-
Method Details
-
getQuads
public List<BakedQuad> getQuads(@Nullable BlockState p_235058_, @Nullable Direction p_235059_, RandomSource p_235060_, 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
-
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
- Specified by:
getParticleIconin interfaceBakedModel
-
getParticleIcon
- Specified by:
getParticleIconin interfaceIBakedModelExtension
-
getTransforms
- 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
-