Interface DynamicPartRenderer<P extends MultiPart,S>


public interface DynamicPartRenderer<P extends MultiPart,S>
Created by covers1624 on 7/26/26.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Contains properties from the base BlockEntityRenderState that are relevant to parts.
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable S
    Create the state instance used for dynamic BlockEntityRenderer based rendering.
    void
    extractDynamicState(DynamicPartRenderer.BEState beState, S state, P part, float partialTick, net.minecraft.world.phys.Vec3 camera, @Nullable net.minecraft.client.renderer.feature.ModelFeatureRenderer.CrumblingOverlay breakProgress)
    Extract any state required to render this part.
    void
    submitDynamic(DynamicPartRenderer.BEState beState, S state, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.SubmitNodeCollector collector, net.minecraft.client.renderer.state.CameraRenderState cameraState)
    Submit your dynamic geometry.
  • Method Details

    • createDynamicState

      @Nullable S createDynamicState()
      Create the state instance used for dynamic BlockEntityRenderer based rendering.
      Returns:
      The state. null will disable dynamic rendering.
    • extractDynamicState

      void extractDynamicState(DynamicPartRenderer.BEState beState, S state, P part, float partialTick, net.minecraft.world.phys.Vec3 camera, @Nullable net.minecraft.client.renderer.feature.ModelFeatureRenderer.CrumblingOverlay breakProgress)
      Extract any state required to render this part.

      You should avoid binding your Part instance directly into the state, in the future extract and submit may not always run on the same thread.

      Parameters:
      beState - Useful information from the BE's own state.
      state - Your state to fill.
      part - Your part.
      partialTick - The current partial ticks.
      camera - The camera location.
      breakProgress - The breaking progress.
    • submitDynamic

      void submitDynamic(DynamicPartRenderer.BEState beState, S state, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.SubmitNodeCollector collector, net.minecraft.client.renderer.state.CameraRenderState cameraState)
      Submit your dynamic geometry.
      Parameters:
      beState - Useful information from the BE's own state.
      state - Your state with filled data.
      poseStack - The current pose stack.
      collector - The submission collector.
      cameraState - The camera state.