Package net.minecraftforge.client.model
Class BakedModelWrapper<T extends BakedModel>
java.lang.Object
net.minecraftforge.client.model.BakedModelWrapper<T>
- All Implemented Interfaces:
BakedModel
,IForgeBakedModel
- Direct Known Subclasses:
FullPotsAccessorDemo.ClientHandler.DioritePotModel
,MegaModelTest.TransformingModelWrapper
Wrapper for
BakedModel
which delegates all operations to its parent.
Useful for creating wrapper baked models which only override certain properties.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionapplyTransform
(ItemDisplayContext cameraTransformType, PoseStack poseStack, boolean applyLeftHandTransform) Applies a transform for the givenItemTransforms.TransformType
andapplyLeftHandTransform
, and returns the model to be rendered.@NotNull ModelData
getModelData
(@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 nullRenderType
is 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
(@NotNull BlockState state, @NotNull RandomSource rand, @NotNull ModelData data) Gets the set ofrender types
to use when drawing this block in the level.getRenderTypes
(ItemStack itemStack, boolean fabulous) Gets an ordered list ofrender types
to use when drawing this item.boolean
boolean
isGui3d()
boolean
boolean
useAmbientOcclusion
(BlockState state) boolean
useAmbientOcclusion
(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:
getQuads
in interfaceBakedModel
-
useAmbientOcclusion
public boolean useAmbientOcclusion()- Specified by:
useAmbientOcclusion
in interfaceBakedModel
-
useAmbientOcclusion
- Specified by:
useAmbientOcclusion
in interfaceIForgeBakedModel
-
useAmbientOcclusion
- Specified by:
useAmbientOcclusion
in interfaceIForgeBakedModel
-
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
- Specified by:
getParticleIcon
in interfaceBakedModel
-
getTransforms
- Specified by:
getTransforms
in interfaceBakedModel
-
getOverrides
- Specified by:
getOverrides
in interfaceBakedModel
-
applyTransform
public BakedModel applyTransform(ItemDisplayContext cameraTransformType, PoseStack poseStack, boolean applyLeftHandTransform) Description copied from interface:IForgeBakedModel
Applies a transform for the givenItemTransforms.TransformType
andapplyLeftHandTransform
, and returns the model to be rendered.- Specified by:
applyTransform
in interfaceIForgeBakedModel
-
getParticleIcon
- Specified by:
getParticleIcon
in 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:IForgeBakedModel
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 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:
getModelData
in interfaceIForgeBakedModel
-
getRenderTypes
public ChunkRenderTypeSet getRenderTypes(@NotNull @NotNull BlockState state, @NotNull @NotNull RandomSource rand, @NotNull @NotNull ModelData data) Description copied from interface:IForgeBakedModel
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 interfaceIForgeBakedModel
-
getRenderTypes
Description copied from interface:IForgeBakedModel
Gets an ordered list ofrender types
to use when drawing this item. All render types using theDefaultVertexFormat.NEW_ENTITY
format 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:
getRenderTypes
in interfaceIForgeBakedModel
- See Also:
-
getRenderPasses
Description copied from interface:IForgeBakedModel
Gets 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:
getRenderPasses
in interfaceIForgeBakedModel
- See Also:
-