# Player Emotes

{% hint style="warning" %}
This method requires **Minecraft 1.17+ clients.**\
**Old clients cannot see them, it's a limitation of the game itself!**
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=posxlbudF8I>" %}

### Main features

* [Blockbench](https://www.blockbench.net/) extension to animate the Minecraft player model
* Completely Async, no TPS drops
* Optimized for big servers
* Play sounds and particles in animations
* Shows player hands and helmet equipment

## Limitations

* Won't show the player armor equipment, only mainhand, offhand and helmet.
* Works only on Minecraft 1.17+
* Shaders mods (***Optifine***, ***Iris***) can cause rendering problems, [read more here](https://itemsadder.devs.beer/japanese/faq/broken-emote-textures).
* Placed heads won't be shown correctly in some cases, [read more here](https://itemsadder.devs.beer/japanese/faq/placed-heads-texture-glitched).

## Installing the Blockbench extension

{% hint style="warning" %}
**Before continuing:**

* Make sure you're running **Blockbench 4.7.4** or **greater**
* Make sure you're running the latest ItemsAdder and latest ItemsAdder Blockbench extension
  {% endhint %}

[Download Blockbench](https://www.blockbench.net/) (don't use the web app).

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-090f37255cc727b9d2a60eba71742df79c64bf38%2Fimage%20\(98\)%20\(1\).png?alt=media)

\
[Download](https://github.com/LoneDev6/itemsadder-entity/releases) the extension file.

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-fb27287a61225906fa3319a4f5c8de0cfcd74fa0%2Fia-entities-download-js.png?alt=media" alt=""><figcaption></figcaption></figure>

Then open **Blockbench** and click on File -> Plugins.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-f7f9f400f4fd99e2dbb0b4ded13f9395c14be9d5%2Fimage%20\(48\)%20\(1\)%20\(1\).png?alt=media)

Click on the icon to load plugins from file, then select the file `iaentitymodel.js`.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-bd4d520839fec0db986934507aa5aada4366ff48%2Fimage%20\(74\)%20\(1\)%20\(1\).png?alt=media)

Press OK

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-334ee5eda47d912a0440cc9206b1995b2b276459%2Fimage%20\(71\).png?alt=media)

## Enabling emotes

Open `config.yml` of ItemsAdder and enable these two options, then run `/iazip` command.

{% code title="config.yml" %}

```yaml
entities:
  custom-entitites:
    enabled: true
    emotes: true
```

{% endcode %}

## Opening the animations editor

Create a new "`ItemsAdder Entity Model`"

You can create as many as animations files you want (**ItemsAdder 3.2.1+**).

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-4b685c325d0b58f4a060987470eeed2349c92df7%2Fia-entities-new.png?alt=media" alt=""><figcaption></figcaption></figure>

Decide if you want to create an emotes file with examples or a blank emotes file.

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-08cc797bdae4117a50f14af018af61b6989be810%2Fia-entities-new2.png?alt=media" alt=""><figcaption></figcaption></figure>

Decide a name for your emotes pack.

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-30f5b1fc590502015fb4ee39b13423a6bae56265%2Fia-entities-new3.png?alt=media" alt=""><figcaption></figcaption></figure>

You can notice a lot of example animations on the left.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-864c9b1f39728f28f152d303b882c79145978202%2Fimage%20\(51\)%20\(3\).png?alt=media)

Delete all the emotes and edit/rename the ones you want.\
They are useful only as base for your new emotes, to have an example to learn from.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-21e3594722be1a1f54ace2e3153a6435932ade14%2Fimage%20\(68\).png?alt=media)

Now create a new animation (emote) and save your `.iaentitymodel` project file into this folder (change `my_emotes` to your namespace, this one is an example):\
`ItemsAdder/contents/my_emotes/resourcepack/`

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-4c1f66f3710f9deeede13ef81ff1bcd92a50ad24%2Fimage%20\(95\).png?alt=media)

Then continue following the tutorial to know how to export the emotes into ItemsAdder.

### Apply the changes to ItemsAdder

Click on the **ItemsAdder** tab and press **Export**.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-85820832bfb7115141c003a5c42facf6cec59ead%2Fimage%20\(100\).png?alt=media)

You should get a success message.

![](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-f94eab1bc2408f04a048a453fac820391e0f60dc%2Fimage%20\(81\)%20\(1\).png?alt=media)

{% hint style="success" %}
If you didn't add any custom model into your emote there is <mark style="color:green;">no need</mark> to use `/iazip`!\
Use the command `/iareload` to load the new animation in the game.
{% endhint %}

## Playing the animations

Use the emote command: `/iaemote <emote> [player]` or `/emote <emote> [player]`

## Emote permission

Use the `/iaemote` command: `ia.user.iaemote`

Use an emote: `ia.user.iaemote.use.<emote>`\
Example: `ia.user.iaemote.use.yes`

### More info about permissions

{% content-ref url="../permissions" %}
[permissions](https://itemsadder.devs.beer/japanese/plugin-usage/permissions)
{% endcontent-ref %}

## Adding custom models into emotes

### Showcase of some examples

{% embed url="<https://youtu.be/VnFNzmhAVIM>" %}

{% embed url="<https://youtu.be/aP5Jz9OW208>" fullWidth="false" %}

### Here you can download an example project:

{% embed url="<https://raw.githubusercontent.com/LoneDev6/SpigotUtilities/master/ItemsAdder/various_files/example_advanced_emotes.iaentitymodel>" %}

You can add custom models to your emotes, for example: items, monsters, furniture, animated effects.

### Important

{% hint style="warning" %}
This requires ItemsAdder 3.5.0 or greater.

* DO NOT delete any built-in player bone.
* DO NOT resize any built-in player bone, it simply won't work ingame.
* Edit built-in player bones only in the animation view (rotate, move).
* You can hide the built-in player bones using scale to `0,0,0`. Set to `1,1,1` to show them again.
  {% endhint %}

### Different type of emotes

* `.player_advanced_animations` file format is now used to identify player animations which also add custom models to the emote.
* `.player_animations` are the player animations which don't add any custom model but will be loaded into the default player model.

In order to decide that you have to set this option in the **Blockbench** extension settings.

[![image](https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-78505d5e7404d8647aa2deb8bb056b97a7e979e8%2Femotes_advanced_1.png?alt=media)](https://user-images.githubusercontent.com/27242001/244145963-c9ca9a77-bb79-4804-92e4-8708eac41517.png)

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-f95ea93e672ace5f880fd2a0d5d47f7043e3b7fe%2Femotes_advanced_2.png?alt=media" alt=""><figcaption></figcaption></figure>

### Importing elements into the scene

You can import any `.bbmodel` into the scene and use it in your animation.\
You can also import extruded textures to show items dynamically.

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-da04cb1349340135535e40218ad8fcfc5d6d333c%2Femotes_advanced_3.png?alt=media" alt=""><figcaption></figcaption></figure>

### Hiding unused elements in other animations of the game `.iaentitymodel` emotes file

1. select the animation
2. select the element you want to hide for a particular animation
3. move to the first frame of the animation, using the timeline
4. create a new scale key, make sure to set it to the first keyframe
5. set scale to 0

Now your model won't be shown for this particular animation.\
You can show/hide it in the middle of the animation just by doing the same thing but setting scale to 1.

<figure><img src="https://2228257718-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Faipc4QQKwVS0w1Q604ya%2Fuploads%2Fgit-blob-6de18f510a24b7319345e919c2aeb4c28a2bd3a8%2Femotes_advanced_4.png?alt=media" alt=""><figcaption></figcaption></figure>
