Interface VanillaPose
public interface VanillaPose
A vanilla model being posed, after vanilla's own animation and any armature clips: change its parts by name
(
"head", "right_arm", "left_leg", "body"; any case or rightArm spelling).
Values are in the units of a Blockbench keyframe: degrees and pixels, Y up. A name the model lacks is ignored. The
changes last for this one draw, and armor and held items follow them.
VanillaModels.player().pose((pose, ctx) -> {
if (ctx.living().isCrouching()) pose.scale("head", 1.3F);
pose.rotate("right_arm", 0, 0, 10);
});
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceChanges made to a vanilla model every time it is posed. -
Method Summary
Modifier and TypeMethodDescriptiondefault VanillaPoseBends a part along its length, at its middle: an elbow, a knee.Hides a part and what hangs from it.@Nullable net.minecraft.client.model.geom.ModelPartThe vanilla part, for anything not covered here; null if the model has no such part.Turns a part further, in degrees.default VanillaPoseScales a part (and what hangs from it).setRotation(String part, float x, float y, float z) Replaces vanilla's turn of a part (from its rest), in degrees.net.minecraft.client.renderer.entity.state.LivingEntityRenderStatestate()What is being drawn.Moves a part (and what hangs from it), in pixels.
-
Method Details
-
part
The vanilla part, for anything not covered here; null if the model has no such part. -
rotate
Turns a part further, in degrees. -
setRotation
Replaces vanilla's turn of a part (from its rest), in degrees. -
translate
Moves a part (and what hangs from it), in pixels. -
scale
Scales a part (and what hangs from it). -
scale
-
bend
Bends a part along its length, at its middle: an elbow, a knee. Its sleeve or pants layer, its armor and an item in its hand bend with it.- Parameters:
degrees- how far; positive bends towarddirectiondirection- which way round the limb, in degrees: 0 forward, 90 to its left, 180 back
-
bend
-
hide
Hides a part and what hangs from it. -
state
net.minecraft.client.renderer.entity.state.LivingEntityRenderState state()What is being drawn.
-