Class BakedArmature
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.BakedArmature
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBakedArmature(net.minecraft.resources.Identifier id, List<Joint> joints, ArmatureMesh mesh, List<ArmaturePoint> points, Map<String, Clip> clips, net.minecraft.resources.Identifier[] textures, @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 fromArmature.get(). -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.AABBbounds()The space the faces fill at rest, in model pixels.@Nullable Clipclips()@Nullable net.minecraft.resources.IdentifierglowTexture(int slot) The glow layer of a texture slot, drawn on top at full brightness; null if it has none.booleannet.minecraft.resources.Identifierid()booleanisEmpty()Whether nothing could be loaded: a missing or broken file.booleanisWithin(int joint, int ancestor) Whetherjointisancestoror somewhere below it.joint(int index) @Nullable JointintintjointIndex(String name) A joint's index by name, or -1 if there is no such joint.joints()Every joint, parents before their children.mesh()The faces, by texture and material.org.joml.Vector3fcoffset()Model pixels moved before drawing: (-8, 0, -8) for a Java block model, whose origin is a corner.@Nullable ArmaturePointpoints()props()The.objmodels its.armature.jsonputs on its joints and points.floatscale()The size its.armature.jsonasks for, 1 if it doesn't.net.minecraft.resources.Identifiertexture(int slot) The texture of each slot (a Blockbench model can have several).inttoString()
-
Field Details
-
EMPTY
-
-
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 fromArmature.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
-
jointCount
public int jointCount() -
joint
-
joint
-
jointIndex
A joint's index by name, or -1 if there is no such joint. -
isWithin
public boolean isWithin(int joint, int ancestor) Whetherjointisancestoror somewhere below it. -
points
-
point
-
clips
-
clip
-
hasClip
-
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.jsonasks for, 1 if it doesn't. -
props
-
mesh
The faces, by texture and material. Used by CoolCatLib's renderers. -
toString
-