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 Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Changes made to a vanilla model every time it is posed.
  • Method Summary

    Modifier and Type
    Method
    Description
    default VanillaPose
    bend(String part, float degrees)
     
    bend(String part, float degrees, float direction)
    Bends a part along its length, at its middle: an elbow, a knee.
    hide(String part)
    Hides a part and what hangs from it.
    @Nullable net.minecraft.client.model.geom.ModelPart
    part(String name)
    The vanilla part, for anything not covered here; null if the model has no such part.
    rotate(String part, float x, float y, float z)
    Turns a part further, in degrees.
    default VanillaPose
    scale(String part, float scale)
     
    scale(String part, float x, float y, float z)
    Scales 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.LivingEntityRenderState
    What is being drawn.
    translate(String part, float x, float y, float z)
    Moves a part (and what hangs from it), in pixels.
  • Method Details

    • part

      @Nullable @Nullable net.minecraft.client.model.geom.ModelPart part(String name)
      The vanilla part, for anything not covered here; null if the model has no such part.
    • rotate

      VanillaPose rotate(String part, float x, float y, float z)
      Turns a part further, in degrees.
    • setRotation

      VanillaPose setRotation(String part, float x, float y, float z)
      Replaces vanilla's turn of a part (from its rest), in degrees.
    • translate

      VanillaPose translate(String part, float x, float y, float z)
      Moves a part (and what hangs from it), in pixels.
    • scale

      VanillaPose scale(String part, float x, float y, float z)
      Scales a part (and what hangs from it).
    • scale

      default VanillaPose scale(String part, float scale)
    • bend

      VanillaPose bend(String part, float degrees, float direction)
      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 toward direction
      direction - which way round the limb, in degrees: 0 forward, 90 to its left, 180 back
    • bend

      default VanillaPose bend(String part, float degrees)
    • hide

      VanillaPose hide(String part)
      Hides a part and what hangs from it.
    • state

      net.minecraft.client.renderer.entity.state.LivingEntityRenderState state()
      What is being drawn.