Class BakedArmature

java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.BakedArmature

public final class BakedArmature extends Object
An armature as loaded from its files: joints, faces, points, clips and textures. Get it from Armature.get() each time rather than keeping it, since resource packs reloading replaces it.
  • Field Details

  • Constructor Details

    • BakedArmature

      public BakedArmature(net.minecraft.resources.Identifier id, List<Joint> joints, ArmatureMesh mesh, List<ArmaturePoint> points, Map<String,Clip> clips, net.minecraft.resources.Identifier[] textures, @Nullable @Nullable net.minecraft.resources.Identifier[] glowTextures, net.minecraft.world.phys.AABB bounds, org.joml.Vector3fc offset, float scale, List<Consumer<Animator>> defaults, List<ObjProp> props, boolean empty)
      Built by CoolCatLib's loader; mods get armatures from Armature.get().
  • Method Details

    • id

      public net.minecraft.resources.Identifier id()
    • isEmpty

      public boolean isEmpty()
      Whether nothing could be loaded: a missing or broken file. It draws nothing and plays nothing.
    • joints

      public List<Joint> joints()
      Every joint, parents before their children.
    • jointCount

      public int jointCount()
    • joint

      public Joint joint(int index)
    • joint

      @Nullable public @Nullable Joint joint(String name)
    • jointIndex

      public int jointIndex(String name)
      A joint's index by name, or -1 if there is no such joint.
    • isWithin

      public boolean isWithin(int joint, int ancestor)
      Whether joint is ancestor or somewhere below it.
    • points

      public List<ArmaturePoint> points()
    • point

      @Nullable public @Nullable ArmaturePoint point(String name)
    • clips

      public Collection<Clip> clips()
    • clip

      @Nullable public @Nullable Clip clip(String name)
    • hasClip

      public boolean hasClip(String name)
    • texture

      public net.minecraft.resources.Identifier texture(int slot)
      The texture of each slot (a Blockbench model can have several).
    • textureCount

      public int textureCount()
    • glowTexture

      @Nullable public @Nullable net.minecraft.resources.Identifier glowTexture(int slot)
      The glow layer of a texture slot, drawn on top at full brightness; null if it has none.
    • bounds

      public net.minecraft.world.phys.AABB bounds()
      The space the faces fill at rest, in model pixels.
    • offset

      public org.joml.Vector3fc offset()
      Model pixels moved before drawing: (-8, 0, -8) for a Java block model, whose origin is a corner.
    • scale

      public float scale()
      The size its .armature.json asks for, 1 if it doesn't.
    • props

      public List<ObjProp> props()
      The .obj models its .armature.json puts on its joints and points.
    • mesh

      public ArmatureMesh mesh()
      The faces, by texture and material. Used by CoolCatLib's renderers.
    • toString

      public String toString()
      Overrides:
      toString in class Object