Class VanillaArmatures
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.armature.vanilla.VanillaArmatures
Armatures on vanilla models (
VanillaModels). While an entity is extracted, its animator and attachments move
on; each time vanilla poses one of its models (the body for its layers, then each model drawn: body, armor), the
clips and changes go on top, by part name. A model touched this way is put back before vanilla poses it again, as
models are shared by every entity of the kind.
Axes: vanilla models are upside down and mirrored against Blockbench (X and Y flipped), so a pose's X and Y turns and positions change sign; a keyframe's own values then read the same on both, as in Bedrock.
Posing runs several times a frame for every such entity, so it does no lookups by name and allocates nothing:
joints are matched to parts once per armature (ModelParts.Binding), and each model keeps one record of what
was done to it (VanillaArmatures.Touch), reused every time.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidAfter vanilla posed a model for a state: the entity's clips and changes on top.static @Nullable Animatoranimator(net.minecraft.world.entity.LivingEntity entity) The entity's animator for its vanilla model, made now if it has none: commands for a player seen only in first person (never drawn in the world) still find it.attachments(Object owner) The animators of the armatures an entity wears, for server commands aimed at it.static voidbeforePose(net.minecraft.client.model.Model<?> model) Before vanilla poses a model: undo what was done to it for the last entity.static voidextract(net.minecraft.client.renderer.entity.LivingEntityRenderer<?, ?, ?> renderer, net.minecraft.world.entity.LivingEntity entity, net.minecraft.client.renderer.entity.state.LivingEntityRenderState state, float partialTick) static voidinit()Other animation mods known without registering: the player animation mod Better Combat uses, when loaded.static voidtransformRoot(net.minecraft.client.renderer.entity.state.LivingEntityRenderState state, com.mojang.blaze3d.vertex.PoseStack poseStack) Moves the whole model by the clips' root joint (root, orbodywith torso joint names): somersaults, sitting, lying down.
-
Method Details
-
init
public static void init()Other animation mods known without registering: the player animation mod Better Combat uses, when loaded. -
extract
public static void extract(net.minecraft.client.renderer.entity.LivingEntityRenderer<?, ?, ?> renderer, net.minecraft.world.entity.LivingEntity entity, net.minecraft.client.renderer.entity.state.LivingEntityRenderState state, float partialTick) -
animator
The entity's animator for its vanilla model, made now if it has none: commands for a player seen only in first person (never drawn in the world) still find it. Null if its kind has noVanillaModel. -
attachments
-
transformRoot
public static void transformRoot(net.minecraft.client.renderer.entity.state.LivingEntityRenderState state, com.mojang.blaze3d.vertex.PoseStack poseStack) Moves the whole model by the clips' root joint (root, orbodywith torso joint names): somersaults, sitting, lying down. Called where vanilla scales the model, in its upside-down axes. -
beforePose
public static void beforePose(net.minecraft.client.model.Model<?> model) Before vanilla poses a model: undo what was done to it for the last entity. -
afterPose
After vanilla posed a model for a state: the entity's clips and changes on top.
-