Package net.minecraftforge.client.model
Class BakedModelWrapper<T extends BakedModel>
java.lang.Object
net.minecraftforge.client.model.BakedModelWrapper<T>
- All Implemented Interfaces:
BakedModel,IForgeBakedModel
Wrapper for
BakedModel which delegates all operations to its parent.
Useful for creating wrapper baked models which only override certain properties.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyTransform(ItemDisplayContext cameraTransformType, PoseStack poseStack, boolean applyLeftHandTransform) Applies a transform for the givenandinvalid reference
ItemTransforms.TransformTypeapplyLeftHandTransform, and returns the model to be rendered.@NotNull ModelDatagetModelData(@NotNull BlockAndTintGetter level, @NotNull BlockPos pos, @NotNull BlockState state, @NotNull ModelData modelData) getParticleIcon(@NotNull ModelData data) getQuads(@Nullable BlockState state, @Nullable Direction side, @NotNull RandomSource rand, @NotNull ModelData extraData, @Nullable RenderType renderType) A nullRenderTypeis used for the breaking overlay as well as non-standard rendering, so models should return all their quads.getQuads(@Nullable BlockState state, @Nullable Direction side, RandomSource rand) getRenderPasses(ItemStack itemStack, boolean fabulous) Gets an ordered list of baked models used to render this model as an item.getRenderTypes(ItemStack itemStack, boolean fabulous) Gets an ordered list ofrender typesto use when drawing this item.getRenderTypes(@NotNull BlockState state, @NotNull RandomSource rand, @NotNull ModelData data) Gets the set ofrender typesto use when drawing this block in the level.booleanbooleanisGui3d()booleanbooleanuseAmbientOcclusion(BlockState state) booleanuseAmbientOcclusion(BlockState state, RenderType renderType) boolean
-
Field Details
-
originalModel
-
-
Constructor Details
-
BakedModelWrapper
-
-
Method Details
-
getQuads
public List<BakedQuad> getQuads(@Nullable @Nullable BlockState state, @Nullable @Nullable Direction side, RandomSource rand) - Specified by:
getQuadsin interfaceBakedModel
-
useAmbientOcclusion
public boolean useAmbientOcclusion()- Specified by:
useAmbientOcclusionin interfaceBakedModel
-
useAmbientOcclusion
- Specified by:
useAmbientOcclusionin interfaceIForgeBakedModel
-
useAmbientOcclusion
- Specified by:
useAmbientOcclusionin interfaceIForgeBakedModel
-
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
-
getTransforms
- Specified by:
getTransformsin interfaceBakedModel
-
getOverrides
- Specified by:
getOverridesin interfaceBakedModel
-
applyTransform
public BakedModel applyTransform(ItemDisplayContext cameraTransformType, PoseStack poseStack, boolean applyLeftHandTransform) Description copied from interface:IForgeBakedModelApplies a transform for the givenandinvalid reference
ItemTransforms.TransformTypeapplyLeftHandTransform, and returns the model to be rendered.- Specified by:
applyTransformin interfaceIForgeBakedModel
-
getParticleIcon
- Specified by:
getParticleIconin interfaceIForgeBakedModel
-
getQuads
@NotNull public @NotNull List<BakedQuad> getQuads(@Nullable @Nullable BlockState state, @Nullable @Nullable Direction side, @NotNull @NotNull RandomSource rand, @NotNull @NotNull ModelData extraData, @Nullable @Nullable RenderType renderType) Description copied from interface:IForgeBakedModelA nullRenderTypeis used for the breaking overlay as well as non-standard rendering, so models should return all their quads.- Specified by:
getQuadsin interfaceIForgeBakedModel
-
getModelData
@NotNull public @NotNull ModelData getModelData(@NotNull @NotNull BlockAndTintGetter level, @NotNull @NotNull BlockPos pos, @NotNull @NotNull BlockState state, @NotNull @NotNull ModelData modelData) - Specified by:
getModelDatain interfaceIForgeBakedModel
-
getRenderTypes
public ChunkRenderTypeSet getRenderTypes(@NotNull @NotNull BlockState state, @NotNull @NotNull RandomSource rand, @NotNull @NotNull ModelData data) Description copied from interface:IForgeBakedModelGets 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 interfaceIForgeBakedModel
-
getRenderTypes
Description copied from interface:IForgeBakedModelGets an ordered list ofrender typesto 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
IForgeBakedModel.getRenderPasses(ItemStack, boolean).By default, defers query to
ItemBlockRenderTypes.- Specified by:
getRenderTypesin interfaceIForgeBakedModel- See Also:
-
getRenderPasses
Description copied from interface:IForgeBakedModelGets an ordered list of baked models used to render this model as an item. Each of those models' render types will be queried viaIForgeBakedModel.getRenderTypes(ItemStack, boolean).By default, returns the model itself.
- Specified by:
getRenderPassesin interfaceIForgeBakedModel- See Also:
-