-
Notifications
You must be signed in to change notification settings - Fork 18
Player Emotes
iam edited this page Dec 14, 2022
·
1 revision
A full example of the steps described below can be found here
Create animations for this model. The model can be opened with blockbench. Once the animations are created, you can export them from blockbench as a .animation file.
Start by creating a class that extends EmotePlayer
.
public class EmoteExample extends EmotePlayer {
}
Map<String, JsonObject> ANIMATIONS = ModelLoader.parseAnimations(ANIMATION_STRING);
The parseAnimations utility can be used to get a map containing the animation name and animation data. Pass this object to the loadEmotes
method
public EmoteExample(Instance instance, Pos pos, PlayerSkin skin) {
super(instance, pos, skin);
loadEmotes(ANIMATIONS);
}
getAnimationHandler().playRepeat("dab");
You can get the animation handler and play emotes the same way emotes can be played for normal models.