Class Animators
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.Animators
The animators of armature-driven things on this client, for client code that wants to play something itself (the server's
way is
ArmatureControl). An animator exists once its owner has been drawn.
Animators.whenReady(entity, animator -> animator.play("action", Motion.once("roar")));
Animator animator = Animators.of(blockEntity); // null if it hasn't been drawn
-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Animatorof(net.minecraft.world.entity.Entity entity) static @Nullable Animatorof(net.minecraft.world.item.ItemStack stack) The animator of this very stack (each stack has its own).static @Nullable Animatorof(net.minecraft.world.level.block.entity.BlockEntity blockEntity) static voidRuns code on an entity's, block entity's or stack's animator: now if it has one, else when it is first drawn, provided that is within a second.
-
Method Details
-
of
-
of
@Nullable public static @Nullable Animator of(net.minecraft.world.level.block.entity.BlockEntity blockEntity) -
of
The animator of this very stack (each stack has its own). -
whenReady
-