Class PlayerBodyPartRenderer
java.lang.Object
net.xmx.velthoric.core.body.client.renderer.VxBodyRenderer<net.xmx.velthoric.core.body.VxBody>
net.timtaran.interactivemc.body.player.PlayerBodyPartRenderer
@Environment(CLIENT)
public class PlayerBodyPartRenderer
extends net.xmx.velthoric.core.body.client.renderer.VxBodyRenderer<net.xmx.velthoric.core.body.VxBody>
Renderer for player body part rigid bodies.
Renders player body parts as wireframe cubes with the appropriate dimensions and orientation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidrender(net.xmx.velthoric.core.body.VxBody body, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, float partialTicks, int packedLight, net.xmx.velthoric.core.body.client.VxRenderState renderState) Renders a player body part rigid body as a wireframe cube.static voidrenderUnitCubeWireframe(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight, float r, float g, float b, float a) Renders a unit cube wireframe with the specified color.
-
Constructor Details
-
PlayerBodyPartRenderer
public PlayerBodyPartRenderer()
-
-
Method Details
-
render
public void render(net.xmx.velthoric.core.body.VxBody body, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, float partialTicks, int packedLight, net.xmx.velthoric.core.body.client.VxRenderState renderState) Renders a player body part rigid body as a wireframe cube.- Specified by:
renderin classnet.xmx.velthoric.core.body.client.renderer.VxBodyRenderer<net.xmx.velthoric.core.body.VxBody>- Parameters:
body- the body to renderposeStack- the pose stack for transformationsbufferSource- the buffer source for renderingpartialTicks- the partial ticks for interpolationpackedLight- the packed light valuerenderState- the render state containing transform and other data
-
renderUnitCubeWireframe
public static void renderUnitCubeWireframe(com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.MultiBufferSource bufferSource, int packedLight, float r, float g, float b, float a) Renders a unit cube wireframe with the specified color.This method draws all 12 edges of a unit cube from (0,0,0) to (1,1,1). The pose stack should be positioned and scaled appropriately before calling this method.
- Parameters:
poseStack- the pose stack for transformationsbufferSource- the buffer source for renderingpackedLight- the packed light valuer- the red color component (0.0 to 1.0)g- the green color component (0.0 to 1.0)b- the blue color component (0.0 to 1.0)a- the alpha component (0.0 to 1.0)
-