Apel is a library that brings particle animations to the table with flexible behaviour and a clean developer interface. It promises also lots of predefined shapes & paths to help the developer on their particle scene
Other
2
stars
1
forks
source link
SequentialAnimator doesn't populate the `delays` List #45
When running the following, throws an IndexOutOfBoundsException accessing the delays list:
LinearAnimator linearAnimator =
new LinearAnimator(1, new Vector3f[]{ offset(user, 10, 0, 2), offset(user, -10, 0, 2) }, polygon, .04f);
LinearAnimator linearAnimator2 =
new LinearAnimator(1, new Vector3f[]{
offset(user, 10, 0, 2), offset(user, -10, 0, 2), offset(user, 9, 0, 2), offset(user, -9, 0, 2),
}, polygon, new float[]{.04f, .12f, .4f});
SequentialAnimator sequentialAnimator = new SequentialAnimator(1, linearAnimator, linearAnimator2);
sequentialAnimator.beginAnimation(ApelServerRenderer.client(world));
The following exception is thrown:
[17:56:43] [Server thread/ERROR] (Minecraft) Failed to handle packet net.minecraft.network.packet.c2s.play.PlayerInteractItemC2SPacket@4af79581, suppressing error
java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
at java.base/java.util.Objects.checkIndex(Objects.java:385) ~[?:?]
at java.base/java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
at net.mcbrincie.apel.lib.animators.SequentialAnimator.beginAnimation(SequentialAnimator.java:179) ~[main/:?]
at net.mcbrincie.apel.item.DebugParticleWand1.animators(DebugParticleWand1.java:132) ~[main/:?]
I believe the SequentialAnimator needs to do something with the delay value provided or the number of animators, so the delays list is equal in size to the animators list.
When running the following, throws an
IndexOutOfBoundsException
accessing thedelays
list:The following exception is thrown:
I believe the SequentialAnimator needs to do something with the delay value provided or the number of animators, so the
delays
list is equal in size to theanimators
list.