Interface IForgeBakedModel

All Known Subinterfaces:
BakedModelMixin

@InjectedInterface(net.minecraft.client.resources.model.BakedModel.class) public interface IForgeBakedModel
Extension interface for IForgeBakedModel.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.client.resources.model.BakedModel
    applyTransform(net.minecraft.client.renderer.block.model.ItemTransforms.TransformType transformType, com.mojang.blaze3d.vertex.PoseStack poseStack, boolean applyLeftHandTransform)
    Applies a transform for the given ItemTransforms.TransformType and applyLeftHandTransform, and returns the model to be rendered.
    default @NotNull ModelData
    getModelData(@NotNull net.minecraft.world.level.BlockAndTintGetter level, @NotNull net.minecraft.core.BlockPos pos, @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull ModelData modelData)
     
    net.minecraft.client.renderer.texture.TextureAtlasSprite
    getParticleIcon(@NotNull ModelData data)
     
    @NotNull List<net.minecraft.client.renderer.block.model.BakedQuad>
    getQuads(@Nullable net.minecraft.world.level.block.state.BlockState state, @Nullable net.minecraft.core.Direction side, @NotNull net.minecraft.util.RandomSource rand, @NotNull ModelData data, @Nullable net.minecraft.client.renderer.RenderType renderType)
    A null RenderType is used for the breaking overlay as well as non-standard rendering, so models should return all their quads.
    List<net.minecraft.client.resources.model.BakedModel>
    getRenderPasses(net.minecraft.world.item.ItemStack itemStack, boolean fabulous)
    Gets an ordered list of baked models used to render this model as an item.
    default List<net.minecraft.client.renderer.RenderType>
    getRenderTypes(net.minecraft.world.item.ItemStack itemStack, boolean fabulous)
    Gets an ordered list of render types to use when drawing this item.
    boolean
    useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState state)
     
    default boolean
    useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState state, net.minecraft.client.renderer.RenderType renderType)
     
  • Method Details

    • getQuads

      @NotNull @NotNull List<net.minecraft.client.renderer.block.model.BakedQuad> getQuads(@Nullable @Nullable net.minecraft.world.level.block.state.BlockState state, @Nullable @Nullable net.minecraft.core.Direction side, @NotNull @NotNull net.minecraft.util.RandomSource rand, @NotNull @NotNull ModelData data, @Nullable @Nullable net.minecraft.client.renderer.RenderType renderType)
      A null RenderType is used for the breaking overlay as well as non-standard rendering, so models should return all their quads.
    • useAmbientOcclusion

      boolean useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState state)
    • useAmbientOcclusion

      default boolean useAmbientOcclusion(net.minecraft.world.level.block.state.BlockState state, net.minecraft.client.renderer.RenderType renderType)
    • applyTransform

      net.minecraft.client.resources.model.BakedModel applyTransform(net.minecraft.client.renderer.block.model.ItemTransforms.TransformType transformType, com.mojang.blaze3d.vertex.PoseStack poseStack, boolean applyLeftHandTransform)
      Applies a transform for the given ItemTransforms.TransformType and applyLeftHandTransform, and returns the model to be rendered.
    • getModelData

      @NotNull default @NotNull ModelData getModelData(@NotNull @NotNull net.minecraft.world.level.BlockAndTintGetter level, @NotNull @NotNull net.minecraft.core.BlockPos pos, @NotNull @NotNull net.minecraft.world.level.block.state.BlockState state, @NotNull @NotNull ModelData modelData)
    • getParticleIcon

      net.minecraft.client.renderer.texture.TextureAtlasSprite getParticleIcon(@NotNull @NotNull ModelData data)
    • getRenderTypes

      default List<net.minecraft.client.renderer.RenderType> getRenderTypes(net.minecraft.world.item.ItemStack itemStack, boolean fabulous)
      Gets an ordered list of render types to use when drawing this item. All render types using the DefaultVertexFormat.NEW_ENTITY format are supported.

      This method will only be called on the models returned by getRenderPasses(ItemStack, boolean).

      By default, defers query to ItemBlockRenderTypes.

      See Also:
    • getRenderPasses

      List<net.minecraft.client.resources.model.BakedModel> getRenderPasses(net.minecraft.world.item.ItemStack itemStack, boolean fabulous)
      Gets an ordered list of baked models used to render this model as an item. Each of those models' render types will be queried via getRenderTypes(ItemStack, boolean).

      By default, returns the model itself.

      See Also: