Interface ICCBlockRenderer


@Deprecated(forRemoval=true) @ScheduledForRemoval(inVersion="mc 1.21.2+") public interface ICCBlockRenderer
Deprecated, for removal: This API element is subject to removal in a future version.
Unfortunately, this has become a maintenance and compatability burden. Mods like Sodium are in every single modpack, and we can't realistically tell people not to use it. It's possible a Neo api may pop up that allows features similar to this API. But I'm not going to hold my breath. If someone still requires the functionality that this system provides, they should implement mixins themselves, or Sodium/Embeddium compatability.
Capable of rendering Blocks and Fluids directly to the chunk buffer.

Created by covers1624 on 8/09/2016.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canHandleBlock(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, @Nullable net.minecraft.client.renderer.RenderType renderType)
    Deprecated.
    default boolean
    canHandleEntity(net.minecraft.world.level.block.state.BlockState state)
    Deprecated.
    default boolean
    canHandleFluid(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.material.FluidState fluidState)
    Deprecated.
    void
    renderBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.level.BlockAndTintGetter world, com.mojang.blaze3d.vertex.PoseStack mStack, com.mojang.blaze3d.vertex.VertexConsumer builder, net.minecraft.util.RandomSource random, net.neoforged.neoforge.client.model.data.ModelData data, @Nullable net.minecraft.client.renderer.RenderType renderType)
    Deprecated.
    default void
    renderBreaking(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.level.BlockAndTintGetter world, com.mojang.blaze3d.vertex.PoseStack mStack, com.mojang.blaze3d.vertex.VertexConsumer builder, net.neoforged.neoforge.client.model.data.ModelData data)
    Deprecated.
    default void
    renderEntity(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack nStack, net.minecraft.client.renderer.MultiBufferSource builder, int packedLight, int packedOverlay, net.neoforged.neoforge.client.model.data.ModelData data, @Nullable net.minecraft.client.renderer.RenderType renderType)
    Deprecated.
    default void
    renderFluid(net.minecraft.core.BlockPos pos, net.minecraft.world.level.BlockAndTintGetter world, com.mojang.blaze3d.vertex.VertexConsumer builder, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.material.FluidState fluidState)
    Deprecated.
  • Method Details

    • canHandleBlock

      @Deprecated boolean canHandleBlock(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, @Nullable @Nullable net.minecraft.client.renderer.RenderType renderType)
      Deprecated.
      Called to evaluate weather this ICCBlockRenderer will be called for the specified BlockState.
      Parameters:
      world - The world.
      pos - The pos.
      blockState - The BlockState.
      renderType - The RenderType, null for breaking.
      Returns:
      If you wish to render the BlockState.
    • renderBlock

      @Deprecated void renderBlock(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.level.BlockAndTintGetter world, com.mojang.blaze3d.vertex.PoseStack mStack, com.mojang.blaze3d.vertex.VertexConsumer builder, net.minecraft.util.RandomSource random, net.neoforged.neoforge.client.model.data.ModelData data, @Nullable @Nullable net.minecraft.client.renderer.RenderType renderType)
      Deprecated.
      Called to render your block in world. You MUST use the provided VertexConsumer. THE BUFFER IS ALREADY DRAWING! YOU MAY BE FIRED ON THE CHUNK BATCHING THREAD!
      Parameters:
      state - Your state.
      pos - Position.
      world - World.
      mStack - The PoseStack.
      builder - The VertexConsumer to add quads to.
      random - Position seeded Random for this block position.
      data - Any ModelData.
      renderType - The RenderType, null for breaking.
    • renderBreaking

      @Deprecated default void renderBreaking(net.minecraft.world.level.block.state.BlockState state, net.minecraft.core.BlockPos pos, net.minecraft.world.level.BlockAndTintGetter world, com.mojang.blaze3d.vertex.PoseStack mStack, com.mojang.blaze3d.vertex.VertexConsumer builder, net.neoforged.neoforge.client.model.data.ModelData data)
      Deprecated.
      Called when vanilla is rendering breaking texture over your block. Usually just render out your normal quads.
      Parameters:
      state - Your state.
      pos - Position.
      world - World.
      mStack - The PoseStack.
      builder - The VertexConsumer to add quads to.
      data - Any ModelData.
    • canHandleEntity

      @Deprecated default boolean canHandleEntity(net.minecraft.world.level.block.state.BlockState state)
      Deprecated.
      Parameters:
      state - The state.
      Returns:
      If you wish to render this block.
    • renderEntity

      @Deprecated default void renderEntity(net.minecraft.world.level.block.state.BlockState state, com.mojang.blaze3d.vertex.PoseStack nStack, net.minecraft.client.renderer.MultiBufferSource builder, int packedLight, int packedOverlay, net.neoforged.neoforge.client.model.data.ModelData data, @Nullable @Nullable net.minecraft.client.renderer.RenderType renderType)
      Deprecated.
      Called for misc entities holding or have blocks as part of their model. IronGolems, Enderman, Mooshroom, Minecarts, TNT.
      Parameters:
      state - The BlockState to render.
      nStack - The PoseStack.
      builder - The MultiBufferSource
      packedLight - The LightTexture packed coords.
      packedOverlay - The OverlayTexture packed coords.
      data - Any ModelData.
      renderType - The RenderType may be null.
    • canHandleFluid

      @Deprecated default boolean canHandleFluid(net.minecraft.world.level.BlockAndTintGetter world, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.material.FluidState fluidState)
      Deprecated.
      Called to evaluate weather this ICCBlockRenderer will be called for the specified IFluidState.
      Parameters:
      world - The world.
      pos - The pos.
      blockState - The BlockState
      fluidState - The FluidState.
      Returns:
      If you wish to render the FluidState.
    • renderFluid

      @Deprecated default void renderFluid(net.minecraft.core.BlockPos pos, net.minecraft.world.level.BlockAndTintGetter world, com.mojang.blaze3d.vertex.VertexConsumer builder, net.minecraft.world.level.block.state.BlockState blockState, net.minecraft.world.level.material.FluidState fluidState)
      Deprecated.
      Called to render your fluid in world. You MUST use the provided VertexConsumer. THE BUFFER IS ALREADY DRAWING! YOU MAY BE FIRED ON THE CHUNK BATCHING THREAD!
      Parameters:
      pos - Position.
      world - World.
      builder - The VertexConsumer.
      blockState - The BlockState
      fluidState - The FluidState