Class Armature

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

public final class Armature extends Object
An armature by name: a modelled, animated thing drawn from a Blockbench or Bedrock file. Keep these in fields and constants; get() hands out the loaded model, which a resource pack reload replaces.

Armature.of("mymod", "wisp") looks under assets/mymod/armatures/, first for wisp.armature.json (a definition naming the model, extra animation files, textures, materials, springs and head tracking), then for wisp.bbmodel (a Blockbench project, with its animations and textures inside it), then for wisp.geo.json with wisp.animation.json beside it (Bedrock exports, textured by assets/mymod/textures/armatures/wisp.png). Sub-folders work: Armature.of("mymod", "mobs/wisp").

With no model at all, wisp.animation.json alone is enough: its bones become joints. That suits clips meant for another model, such as emotes for the vanilla player (see VanillaModels).

With no model at all, wisp.animation.json alone is enough: its bones become joints. That suits clips meant for another model, such as emotes for the vanilla player (see VanillaModels).

  • Field Details

    • NONE

      public static final Armature NONE
      No model and no clips: an animator that only runs code (modifiers, variables), never logged as missing.
  • Method Details

    • of

      public static Armature of(net.minecraft.resources.Identifier id)
    • of

      public static Armature of(String namespace, String path)
    • id

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

      public BakedArmature get()
      The loaded armature; read on first use and after every resource reload. An armature that can't be loaded is logged once and gives BakedArmature.EMPTY. Client thread only.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object