V3 Animations - CraZyRc/WhackaMole GitHub Wiki
# Reward animation template: Dragon_wings
Animation:
- 1 1 1 0.3 -0.6133333 0.7733333 0 0 0 0 0 1
- 1 1 1 0.3 0.6133333 0.7733333 0 0 0 0 0 1
- 0.25 0.01 0.02 0.3 -0.6666667 0.72 0 0 0 0 0 1
- 0.16 0.03 0.01 0.3 -0.6133333 0.72 0 0 0 0 0 1
- 0.99 0.99 0.99 0.3 -0.56 0.72 0 0 0 0 0 1
- 0.29 0.05 0.08 0.3 0.6133333 0.72 0 0 0 0 0 1
- 0.11 0.01 0 0.3 0.6666667 0.72 0 0 0 0 0 1
- 0.11 0 0 0.3 -0.72 0.6666667 0 0 0 0 0 1
- 0.66 0 0 0.3 -0.6666667 0.6666667 0 0 0 0 0 1
- 0.23 0 0 0.3 -0.6133333 0.6666667 0 0 0 0 0 1
- 0.95 0.95 0.95 0.3 -0.56 0.6666667 0 0 0 0 0 1
- 0.58 0.09 0.12 0.3 0.6133333 0.6666667 0 0 0 0 0 1
- 0.66 0.02 0.04 0.3 0.6666667 0.6666667 0 0 0 0 0 1
- 0.18 0 0 0.3 0.72 0.6666667 0 0 0 0 0 1
- 1 1 1 0.3 0.7733333 0.6666667 0 0 0 0 0 1
- 0.75 0.75 0.75 0.3 -1.04 0.6133333 0 0 0 0 0 1
- ...
Looking at the template above, I know what you are thinking "This looks difficult". But I assure you, it's not. The animation reward works with particles. Each line in the file is a particle that gets spawned, creating the image you want.
These particles can be copied from vanilla commands. Let's say you have 6 command blocks chained and when turned on they display a small star. You might have 6 commands that might look something like this* :
/particle minecraft:dust 1 1 1 0.3 ~-0.6133333 ~0.7733333 ~0 0 0 0 0 1 normal @a
/particle minecraft:dust 1 1 1 0.3 ~0.6133333 ~0.7733333 ~0 0 0 0 0 1 normal @a
/particle minecraft:dust 0.25 0.01 0.02 0.3 ~-0.6666667 ~0.72 ~0 0 0 0 0 1 normal @a
/particle minecraft:dust 0.16 0.03 0.01 0.3 ~-0.6133333 ~0.72 ~0 0 0 0 0 1 normal @a
/particle minecraft:dust 0.99 0.99 0.99 0.3 ~-0.56 ~0.72 ~0 0 0 0 0 1 normal @a
/particle minecraft:dust 0.29 0.05 0.08 0.3 ~0.6133333 ~0.72 ~0 0 0 0 0 1 normal @a* These 6 particle commands do not actually spawn a star, these are mere examples of how the p[article command could look
But what does each part of the command mean?
particle minecraft:dust 1 0.65 0 0.3 ~-0.0529651 ~0.6532368 ~0 0 0 0 0 1 force @a
<Command> <Particle> <Color> <Scale> <Delta> <Speed> <Count> <Force Visible>
Now we don't need each part for the plugin, most things like the Command, Particle and Force Visible aren't important because these are the same for each particle.
Therefore, you can delete these factors, leaving you with:
1 1 1 0.3 ~-0.6133333 ~0.7733333 ~0 0 0 0 0 1
1 1 1 0.3 ~0.6133333 ~0.7733333 ~0 0 0 0 0 1
0.25 0.01 0.02 0.3 ~-0.6666667 ~0.72 ~0 0 0 0 0 1
0.16 0.03 0.01 0.3 ~-0.6133333 ~0.72 ~0 0 0 0 0 1
0.99 0.99 0.99 0.3 ~-0.56 ~0.72 ~0 0 0 0 0 1
0.29 0.05 0.08 0.3 ~0.6133333 ~0.72 ~0 0 0 0 0 1 The part that is left over is what we use for the animation file.
Create a new file in the animations folder, name it whatever you like, just make sure to avoid using spaces.
In that file, write down: Animation: followed by an enter.
Then underneath the Animation:, paste the lines we made earlier and you should have something that looks like this:
Animation:
1 1 1 0.3 ~-0.6133333 ~0.7733333 ~0 0 0 0 0 1
1 1 1 0.3 ~0.6133333 ~0.7733333 ~0 0 0 0 0 1
0.25 0.01 0.02 0.3 ~-0.6666667 ~0.72 ~0 0 0 0 0 1
0.16 0.03 0.01 0.3 ~-0.6133333 ~0.72 ~0 0 0 0 0 1
0.99 0.99 0.99 0.3 ~-0.56 ~0.72 ~0 0 0 0 0 1
0.29 0.05 0.08 0.3 ~0.6133333 ~0.72 ~0 0 0 0 0 1 Add a space and a dash before each particle and your file is ready to be read, making the finished file look like this:
Animation:
- 1 1 1 0.3 ~-0.6133333 ~0.7733333 ~0 0 0 0 0 1
- 1 1 1 0.3 ~0.6133333 ~0.7733333 ~0 0 0 0 0 1
- 0.25 0.01 0.02 0.3 ~-0.6666667 ~0.72 ~0 0 0 0 0 1
- 0.16 0.03 0.01 0.3 ~-0.6133333 ~0.72 ~0 0 0 0 0 1
- 0.99 0.99 0.99 0.3 ~-0.56 ~0.72 ~0 0 0 0 0 1
- 0.29 0.05 0.08 0.3 ~0.6133333 ~0.72 ~0 0 0 0 0 1 There are multiple ways of creating the particle commands for the file, either you do it the pain-staking way of creating each command block one by one in a survival world. Or you can create an image and convert that to a McFunction file by using Kemo431's Particle-Converter.
This converter allows you to convert an image to a McFunction file containing each particle command. Inside that file you can search for the parts we need to delete and mass delete them to make the work a lot easier.
NOTE: The more particles you spawn, the more lagg the animation creates, so be mindful of how many particles you want to use for the animation.