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 ClassesModifier and TypeInterfaceDescriptionstatic final recordContains properties from the baseBlockEntityRenderStatethat are relevant to parts.static interfaceDynamicPartRenderer.Factory<P extends MultiPart,S> -
Method Summary
Modifier and TypeMethodDescription@Nullable SCreate the state instance used for dynamicBlockEntityRendererbased rendering.voidextractDynamicState(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.voidsubmitDynamic(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 dynamicBlockEntityRendererbased rendering.- Returns:
- The state.
nullwill 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.
-