This repository has been archived by the owner on Jun 15, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
ParticleEffect.java
1669 lines (1629 loc) · 65.8 KB
/
ParticleEffect.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* MIT License
*
* Copyright (c) 2021 ByteZ1337
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package xyz.xenondevs.particle;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
import xyz.xenondevs.particle.data.ParticleData;
import xyz.xenondevs.particle.data.SculkChargeData;
import xyz.xenondevs.particle.data.ShriekData;
import xyz.xenondevs.particle.data.VibrationData;
import xyz.xenondevs.particle.data.color.*;
import xyz.xenondevs.particle.data.texture.BlockTexture;
import xyz.xenondevs.particle.data.texture.ItemTexture;
import xyz.xenondevs.particle.utils.ReflectionUtils;
import java.awt.*;
import java.util.List;
import java.util.*;
import java.util.function.DoubleFunction;
import java.util.function.Function;
import java.util.function.IntFunction;
import java.util.function.Predicate;
import java.util.stream.Collectors;
import static xyz.xenondevs.particle.ParticleConstants.PARTICLE_TYPE_REGISTRY;
import static xyz.xenondevs.particle.ParticleConstants.REGISTRY_GET_METHOD;
import static xyz.xenondevs.particle.PropertyType.*;
/**
* {@link Enum} to reflect particle packets with their respective data.
* <p>
* List of all currently supported effects:
* <ul>
* <li>{@link #ASH}</li>
* <li>{@link #BARRIER}</li>
* <li>{@link #BLOCK_CRACK}</li>
* <li>{@link #BLOCK_DUST}</li>
* <li>{@link #BUBBLE_COLUMN_UP}</li>
* <li>{@link #BLOCK_MARKER}</li>
* <li>{@link #BUBBLE_POP}</li>
* <li>{@link #CAMPFIRE_COSY_SMOKE}</li>
* <li>{@link #CAMPFIRE_SIGNAL_SMOKE}</li>
* <li>{@link #CLOUD}</li>
* <li>{@link #COMPOSTER}</li>
* <li>{@link #CRIMSON_SPORE}</li>
* <li>{@link #CRIT}</li>
* <li>{@link #CRIT_MAGIC}</li>
* <li>{@link #CURRENT_DOWN}</li>
* <li>{@link #DAMAGE_INDICATOR}</li>
* <li>{@link #DOLPHIN}</li>
* <li>{@link #DRAGON_BREATH}</li>
* <li>{@link #DRIP_LAVA}</li>
* <li>{@link #DRIP_WATER}</li>
* <li>{@link #DRIPPING_DRIPSTONE_LAVA}</li>
* <li>{@link #DRIPPING_DRIPSTONE_WATER}</li>
* <li>{@link #DRIPPING_HONEY}</li>
* <li>{@link #DRIPPING_OBSIDIAN_TEAR}</li>
* <li>{@link #DUST_COLOR_TRANSITION}</li>
* <li>{@link #ELECTRIC_SPARK}</li>
* <li>{@link #ENCHANTMENT_TABLE}</li>
* <li>{@link #END_ROD}</li>
* <li>{@link #EXPLOSION_HUGE}</li>
* <li>{@link #EXPLOSION_LARGE}</li>
* <li>{@link #EXPLOSION_NORMAL}</li>
* <li>{@link #FALLING_DRIPSTONE_LAVA}</li>
* <li>{@link #FALLING_DRIPSTONE_WATER}</li>
* <li>{@link #FALLING_DUST}</li>
* <li>{@link #FALLING_HONEY}</li>
* <li>{@link #FALLING_NECTAR}</li>
* <li>{@link #FALLING_OBSIDIAN_TEAR}</li>
* <li>{@link #FALLING_SPORE_BLOSSOM}</li>
* <li>{@link #FIREWORKS_SPARK}</li>
* <li>{@link #FLAME}</li>
* <li>{@link #FLASH}</li>
* <li>{@link #FOOTSTEP}</li>
* <li>{@link #GLOW}</li>
* <li>{@link #GLOW_SQUID_INK}</li>
* <li>{@link #HEART}</li>
* <li>{@link #ITEM_CRACK}</li>
* <li>{@link #LANDING_HONEY}</li>
* <li>{@link #LANDING_OBSIDIAN_TEAR}</li>
* <li>{@link #LAVA}</li>
* <li>{@link #LIGHT}</li>
* <li>{@link #MOB_APPEARANCE}</li>
* <li>{@link #NAUTILUS}</li>
* <li>{@link #NOTE}</li>
* <li>{@link #PORTAL}</li>
* <li>{@link #REDSTONE}</li>
* <li>{@link #REVERSE_PORTAL}</li>
* <li>{@link #SCRAPE}</li>
* <li>{@link #SCULK_CHARGE}</li>
* <li>{@link #SCULK_CHARGE_POP}</li>
* <li>{@link #SCULK_SOUL}</li>
* <li>{@link #SHRIEK}</li>
* <li>{@link #SLIME}</li>
* <li>{@link #SMALL_FLAME}</li>
* <li>{@link #SMOKE_LARGE}</li>
* <li>{@link #SMOKE_NORMAL}</li>
* <li>{@link #SNEEZE}</li>
* <li>{@link #SNOWBALL}</li>
* <li>{@link #SNOWFLAKE}</li>
* <li>{@link #SNOW_SHOVEL}</li>
* <li>{@link #SONIC_BOOM}</li>
* <li>{@link #SOUL}</li>
* <li>{@link #SOUL_FIRE_FLAME}</li>
* <li>{@link #SPELL}</li>
* <li>{@link #SPELL_INSTANT}</li>
* <li>{@link #SPELL_MOB}</li>
* <li>{@link #SPELL_MOB_AMBIENT}</li>
* <li>{@link #SPELL_WITCH}</li>
* <li>{@link #SPIT}</li>
* <li>{@link #SPORE_BLOSSOM_AIR}</li>
* <li>{@link #SQUID_INK}</li>
* <li>{@link #SUSPENDED}</li>
* <li>{@link #SUSPENDED_DEPTH}</li>
* <li>{@link #SWEEP_ATTACK}</li>
* <li>{@link #TOTEM}</li>
* <li>{@link #TOWN_AURA}</li>
* <li>{@link #VIBRATION}</li>
* <li>{@link #VILLAGER_ANGRY}</li>
* <li>{@link #VILLAGER_HAPPY}</li>
* <li>{@link #WARPED_SPORE}</li>
* <li>{@link #WATER_BUBBLE}</li>
* <li>{@link #WATER_DROP}</li>
* <li>{@link #WATER_SPLASH}</li>
* <li>{@link #WATER_WAKE}</li>
* <li>{@link #WAX_OFF}</li>
* <li>{@link #WAX_ON}</li>
* <li>{@link #WHITE_ASH}</li>
* </ul>
*
* @author ByteZ
* @since 28.05.2019
*/
public enum ParticleEffect {
/**
* In vanilla, this particle is randomly displayed in the
* basalt deltas nether biome.
* <p>
* The movement of this particle is handled completely clientside
* and can therefore not be influenced.
* <p>
* <b>Information</b>
* <ul>
* <li>Appearance: Gray/White square</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This Particle gets a random velocity while falling down.</li>
* </ul>
*/
ASH(version -> version < 16 ? "NONE" : "ash"),
/**
* <b>REPLACED BY {@link #BLOCK_MARKER} SINCE 1.18</b>
* <p>
* In vanilla, this particle is displayed by barrier blocks
* when a player holds a barrier item in the main or off hand.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Red box with a slash through it.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
BARRIER(version -> version < 8 || version > 17 ? "NONE" : (version < 13 ? "BARRIER" : "barrier")),
/**
* In vanilla, this particle is displayed when a player breaks
* a block or sprints. It's also displayed by iron golems while
* walking.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Little piece of a texture.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This particle needs a block texture in order to work.</li>
* </ul>
*/
BLOCK_CRACK(version -> version < 8 ? "NONE" : (version < 13 ? "BLOCK_CRACK" : "block"), REQUIRES_BLOCK),
/**
* In vanilla, this particle is displayed when an entity hits the ground
* after falling. It's also displayed when an armorstand is broken.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Little piece of a texture.</li>
* <li>Extra:<ul>
* <li> The velocity of this particle can be set. The amount has to be 0</li>
* <li> This particle needs a block texture in order to work.</li></ul></li>
* </ul>
*/
BLOCK_DUST(version -> version < 8 ? "NONE" : (version < 13 ? "BLOCK_DUST" : "falling_dust"), DIRECTIONAL, REQUIRES_BLOCK),
/**
* In vanilla, this particle is randomly displayed by magma
* blocks and soulsand underwater.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Bubble with blue outline.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
BUBBLE_COLUMN_UP(version -> version < 13 ? "NONE" : "bubble_column_up", DIRECTIONAL),
/**
* In vanilla, this particle is displayed by barrier blocks when a player
* holds a barrier item in the main- or off-hand or by the light block.
* <p>
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Texture of the provided block.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This particle needs a block texture in order to work.</li>
* </ul>
*/
BLOCK_MARKER(version -> version < 18 ? "NONE" : "block_marker", REQUIRES_BLOCK),
/**
* In vanilla, this particle is displayed at the top of
* bubble columns.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue circle.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
BUBBLE_POP(version -> version < 13 ? "NONE" : "bubble_pop", DIRECTIONAL),
/**
* In vanilla, this particle is displayed by campfires.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Smoke cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
CAMPFIRE_COSY_SMOKE(version -> version < 14 ? "NONE" : "campfire_cosy_smoke", DIRECTIONAL),
/**
* In vanilla, this particle is displayed by campfires with
* a hay bale placed under them.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Smoke cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
CAMPFIRE_SIGNAL_SMOKE(version -> version < 14 ? "NONE" : "campfire_signal_smoke", DIRECTIONAL),
/**
* In vanilla, this particle is displayed when an entity dies.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Large white cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
CLOUD(version -> version < 8 ? "NONE" : (version < 13 ? "CLOUD" : "cloud"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed when a composter
* is used by a player.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Green start</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
COMPOSTER(version -> version < 14 ? "NONE" : "composter"),
/**
* In vanilla, this particle is displayed in the crimson forest
* nether biome.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Pink square.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: This Particle gets a random velocity up.</li>
* </ul>
*/
CRIMSON_SPORE(version -> version < 16 ? "NONE" : "crimson_spore"),
/**
* In vanilla, this particle is displayed when a player lands
* a critical hit on an entity or an arrow is launched with full power.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Light brown cross.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* </ul>
*/
CRIT(version -> version < 8 ? "NONE" : (version < 13 ? "CRIT" : "crit"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed when a player hits
* an entity with a sharpness sword.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Cyan star.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* </ul>
*/
CRIT_MAGIC(version -> version < 8 ? "NONE" : (version < 13 ? "CRIT_MAGIC" : "enchanted_hit"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed by magma blocks underwater.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Cyan star.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
CURRENT_DOWN(version -> version < 13 ? "NONE" : "current_down"),
/**
* In vanilla, this particle is displayed when a Player hits
* an Entity by melee attack.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A dark red heart.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
DAMAGE_INDICATOR(version -> version < 9 ? "NONE" : (version < 13 ? "DAMAGE_INDICATOR" : "damage_indicator"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed as a trail of
* dolphins.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A blue square.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
DOLPHIN(version -> version < 13 ? "NONE" : "dolphin"),
/**
* In vanilla, this particle is displayed by the ender dragons
* breath and ender fireballs.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A purple cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
DRAGON_BREATH(version -> version < 9 ? "NONE" : (version < 13 ? "DRAGON_BREATH" : "dragon_breath"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed randomly when a
* lava block is above a block.
* <b>Information</b>:
* <ul>
* <li>Appearance: Orange drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
DRIP_LAVA(version -> version < 8 ? "NONE" : (version < 13 ? "DRIP_LAVA" : "dripping_lava")),
/**
* In vanilla, this particle is displayed randomly when a
* water block is above a block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
DRIP_WATER(version -> version < 8 ? "NONE" : (version < 13 ? "DRIP_WATER" : "dripping_water")),
/**
* In vanilla, this particle is shown dripping from the
* tip of pointed dripstones.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Orange drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
DRIPPING_DRIPSTONE_LAVA(version -> version < 17 ? "NONE" : "dripping_dripstone_lava"),
/**
* In vanilla, this particle is shown dripping from the
* tip of pointed dripstones.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
DRIPPING_DRIPSTONE_WATER(version -> version < 17 ? "NONE" : "dripping_dripstone_water"),
/**
* In vanilla, this particle is displayed by beehives filled
* with honey. As opposed to the {@link #FALLING_HONEY} particles,
* this particle floats in the air before falling to the ground.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A rectangular honey drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: Spawns a {@link #LANDING_HONEY} particle after landing on a block.</li>
* </ul>
*/
DRIPPING_HONEY(version -> version < 15 ? "NONE" : "dripping_honey"),
/**
* In vanilla, this particle is displayed by crying obsidian.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A rectangular obsidian tear.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: Spawns a {@link #LANDING_OBSIDIAN_TEAR} particle after landing on a block.</li>
* </ul>
*/
DRIPPING_OBSIDIAN_TEAR(version -> version < 16 ? "NONE" : "dripping_obsidian_tear"),
/**
* In vanilla, this particle is displayed when a sculk sensor is triggered.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Tiny colored cloud that changes color.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This particle supports 2 colors. It will display a fade animation between the two colors. It also
* supports a custom size.
* More information can be found here: {@link PropertyType#DUST}, {@link DustColorTransitionData}</li>
* </ul>
*/
DUST_COLOR_TRANSITION(version -> version < 17 ? "NONE" : "dust_color_transition", COLORABLE, DUST),
/**
* In vanilla, this particle appears when a lightning bolt hits
* copper blocks.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A small spark.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set.</li>
* </ul>
*/
ELECTRIC_SPARK(version -> version < 17 ? "NONE" : "electric_spark", DIRECTIONAL),
/**
* In vanilla, this particle is displayed by bookshelves near
* an enchanting table.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A random letter from the galactic alphabet.</li>
* <li>Speed value: Influences the spread of this particle effect.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
ENCHANTMENT_TABLE(version -> version < 8 ? "NONE" : (version < 13 ? "ENCHANTMENT_TABLE" : "enchant"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed by end rods and
* shulker bullets.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: White circle.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
END_ROD(version -> version < 9 ? "NONE" : (version < 13 ? "END_ROD" : "end_rod"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed when tnt or creeper
* explodes.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Gray ball which fades away after a few seconds.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
EXPLOSION_HUGE(version -> version < 8 ? "NONE" : (version < 13 ? "EXPLOSION_HUGE" : "explosion_emitter")),
/**
* In vanilla, this particle is displayed when a fireball
* explodes or a wither skull hits a block/entity.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Gray ball which fades away after a few seconds.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
EXPLOSION_LARGE(version -> version < 8 ? "NONE" : (version < 13 ? "EXPLOSION_LARGE" : "explosion")),
/**
* In vanilla, this particle is displayed when either a creeper or
* a tnt explodes.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: White smoke.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* </ul>
*/
EXPLOSION_NORMAL(version -> version < 8 ? "NONE" : (version < 13 ? "EXPLOSION_NORMAL" : "poof"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed after {@link #DRIPPING_DRIPSTONE_LAVA}
* starts falling from pointed dripstones.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Orange drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
FALLING_DRIPSTONE_LAVA(version -> version < 17 ? "NONE" : "falling_dripstone_lava"),
/**
* In vanilla, this particle is displayed after {@link #DRIPPING_DRIPSTONE_WATER}
* starts falling from pointed dripstones.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
FALLING_DRIPSTONE_WATER(version -> version < 17 ? "NONE" : "falling_dripstone_water"),
/**
* In vanilla, this particle is displayed randomly by floating sand
* and gravel.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: a circle part of a texture.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This particle needs a block texture in order to work.</li>
* </ul>
*/
FALLING_DUST(version -> version < 10 ? "NONE" : (version < 13 ? "FALLING_DUST" : "falling_dust"), REQUIRES_BLOCK),
/**
* In vanilla, this particle is displayed below beehives filled
* with honey. As opposed to the {@link #DRIPPING_HONEY} particles,
* this particle falls instantly.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A rectangular honey drop.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: Spawns a {@link #LANDING_HONEY} after landing on a block.</li>
* </ul>
*/
FALLING_HONEY(version -> version < 15 ? "NONE" : "falling_honey"),
/**
* In vanilla, this particle is displayed by bees that have pollen
* and are on their way to the beehive.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: White square.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
FALLING_NECTAR(version -> version < 15 ? "NONE" : "falling_nectar"),
/**
* In vanilla, this particle is displayed below crying obsidian
* blocks.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Purple square.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
FALLING_OBSIDIAN_TEAR(version -> version < 16 ? "NONE" : "falling_obsidian_tear"),
/**
* In vanilla, this particle is displayed below spore blossoms.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Green square.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
FALLING_SPORE_BLOSSOM(version -> version < 17 ? "NONE" : "falling_spore_blossom"),
/**
* In vanilla, this particle is displayed when a firework is
* launched.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Sparkling white star.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* </ul>
*/
FIREWORKS_SPARK(version -> version < 8 ? "NONE" : (version < 13 ? "FIREWORKS_SPARK" : "firework"), DIRECTIONAL),
/**
* In vanilla, this particle is randomly displayed by torches,
* active furnaces,spawners and magma cubes.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Tiny flame.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
FLAME(version -> version < 8 ? "NONE" : (version < 13 ? "FLAME" : "flame"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed by exploding fireworks
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A white glow.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: The color of this flash can't be set since it's only set clientside.</li>
* </ul>
*/
FLASH(version -> version < 14 ? "NONE" : "flash"),
/**
* This particle is unused and is removed in the version 1.13.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Low opacity gray square.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
FOOTSTEP(version -> version > 8 && version < 13 ? "FOOTSTEP" : "NONE"),
/**
* In vanilla, this particle is displayed by a glow squid.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Cyan star.</li>
* <li>Speed value: Doesn't seem to influence the particle.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0. Please note that this particle
* is barely moveable.</li>
* </ul>
*/
GLOW(version -> version < 17 ? "NONE" : "glow", DIRECTIONAL),
/**
* In vanilla, this particle is displayed by a glow squid when it gets hurt.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Cyan ink.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
GLOW_SQUID_INK(version -> version < 17 ? "NONE" : "glow_squid_ink", DIRECTIONAL),
/**
* In vanilla, this particle is displayed when taming or
* breeding animals.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Red heart.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
HEART(version -> version < 8 ? "NONE" : (version < 13 ? "HEART" : "heart")),
/**
* In vanilla, this particle is displayed when a tool is
* broken, an egg or a splash potion hits an entity or a block, It is
* also displayed when a player eats or an eye of ender breaks.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Little piece of a texture.</li>
* <li>Extra:<ul>
* <li> The velocity of this particle can be set. The amount has to be 0.</li>
* <li> This particle needs a item texture in order to work.</li></ul></li>
* </ul>
*/
ITEM_CRACK(version -> version < 8 ? "NONE" : (version < 13 ? "ITEM_CRACK" : "item"), DIRECTIONAL, REQUIRES_ITEM),
/**
* In vanilla, this particle is displayed after a falling or
* dripping Honey particle reaches a block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Honey colored lines.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This Particle stays on the ground and doesn't instantly despawn.</li>
* </ul>
*/
LANDING_HONEY(version -> version < 15 ? "NONE" : "landing_honey"),
/**
* In vanilla, this particle is displayed after a falling or
* dripping obsidian tear reaches a block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Purple colored lines.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: This Particle stays on the ground and doesn't instantly despawn.</li>
* </ul>
*/
LANDING_OBSIDIAN_TEAR(version -> version < 16 ? "NONE" : "landing_obsidian_tear"),
/**
* In vanilla, this particle is randomly displayed by lava.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Orange lava ball.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
LAVA(version -> version < 8 ? "NONE" : (version < 13 ? "LAVA" : "lava")),
/**
* <b>REPLACED BY {@link #BLOCK_MARKER} SINCE 1.18</b>
* <p>
* In vanilla, this particle is displayed by the light block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: 1.17: four yellow stars. Since 1.18: A lightbulb</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
LIGHT(version -> version != 17 ? "NONE" : "light"),
/**
* In vanilla, this particle is displayed by elder guardians.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A elder guardian.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
MOB_APPEARANCE(version -> version < 8 ? "NONE" : (version < 13 ? "MOB_APPEARANCE" : "elder_guardian")),
/**
* In vanilla, this particle is displayed by active conduits.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue circle with a brown core.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
NAUTILUS(version -> version < 13 ? "NONE" : "nautilus", DIRECTIONAL),
/**
* In vanilla, this particle is displayed when rightclicking
* or activating a note block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Colored Note.</li>
* <li>Speed value: Causes the particle to be green when set to 0.</li>
* <li>Extra: the offsetX parameter represents which note should be displayed. The amount has to be 0 or the color won't work.</li>
* </ul>
*/
NOTE(version -> version < 8 ? "NONE" : (version < 13 ? "NOTE" : "note"), COLORABLE),
/**
* In vanilla, this particle is randomly displayed by nether
* portal, endermen, ender chests, dragon eggs, endermites and end
* gateway portals. It is also displayed when an ender pearl hits
* a block or an entity, when an eye of ender beaks or when the player eats
* a chorus fruit.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Purple cloud.</li>
* <li>Speed value: Influences the spread of this particle effect.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
PORTAL(version -> version < 8 ? "NONE" : (version < 13 ? "PORTAL" : "portal"), DIRECTIONAL),
/**
* In vanilla, this particle is randomly displayed by active
* redstone ore, active redstone, active redstone repeater and
* active redstone torches. Since 1.13 it is also displayed when
* pressing a button, activating a lever or stepping onto a pressure
* plate
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Tiny colored cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: offsetX, offsetY and offsetZ represent the rgb values of the particle. The amount has to be 0 or the color won't work.</li>
* </ul>
*/
REDSTONE(version -> version < 8 ? "NONE" : (version < 13 ? "REDSTONE" : "dust"), COLORABLE, DUST),
/**
* Currently Unused in vanilla. It's pretty much the same as the normal portal
* particle but instead of flying to the original location it flies away at the specified
* velocity.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Purple Cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
REVERSE_PORTAL(version -> version < 16 ? "NONE" : "reverse_portal", DIRECTIONAL),
/**
* In vanilla, this particle is displayed when oxidation is scraped off a copper block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Cyan star.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SCRAPE(version -> version < 17 ? "NONE" : "scrape", DIRECTIONAL),
/**
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue dust turning into a circle.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: You can use the {@link SculkChargeData} class to change the roll of this particle.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SCULK_CHARGE(version -> version < 19 ? "NONE" : "sculk_charge", DIRECTIONAL),
/**
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A blue circle popping.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SCULK_CHARGE_POP(version -> version < 19 ? "NONE" : "sculk_charge_pop", DIRECTIONAL),
/**
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A blue soul.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SCULK_SOUL(version -> version < 19 ? "NONE" : "sculk_soul", DIRECTIONAL),
/**
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A blue circle flying up.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* <li>Extra: You can set the delay before the particle appears using the {@link ShriekData} class.</li>
* </ul>
*/
SHRIEK(version -> version < 19 ? "NONE" : "shriek"),
/**
* In vanilla, this particle is displayed by jumping slimes.
* <p>
* The particle originates from the nms EntitySlime class.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Tiny part of the slimeball icon.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
SLIME(version -> version < 8 ? "NONE" : (version < 13 ? "SLIME" : "item_slime")),
/**
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A small flame.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SMALL_FLAME(version -> version < 17 ? "NONE" : "small_flame", DIRECTIONAL),
/**
* In vanilla, this particle is randomly displayed by fire, furnace
* minecarts and blazes. It's also displayed when trying to place water
* in the nether.
* <p>
* The particle originates from the nms ItemBucket, EntityBlaze
* BlockFluids and EntityMinecart classes.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Large gray cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* </ul>
*/
SMOKE_LARGE(version -> version < 8 ? "NONE" : (version < 13 ? "SMOKE_LARGE" : "large_smoke"), DIRECTIONAL),
/**
* In vanilla, this particle is randomly displayed by primed
* tnt, torches, end portals, active brewing stands, monster
* spawners or when either a dropper or dispenser gets triggered. It's
* also displayed when taming a wild animal or an explosion occurs.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Little gray cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* </ul>
*/
SMOKE_NORMAL(version -> version < 8 ? "NONE" : (version < 13 ? "SMOKE_NORMAL" : "smoke"), DIRECTIONAL),
/**
* In vanilla, this particle is displayed by sneezing baby pandas.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Green cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SNEEZE(version -> version < 14 ? "NONE" : "sneeze", DIRECTIONAL),
/**
* In vanilla, this particle is displayed when a snowball
* hits an entity or a block.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Little peace of the snowball texture.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
SNOWBALL(version -> version < 8 ? "NONE" : (version < 13 ? "SNOWBALL" : "item_snowball")),
/**
* In vanilla, this particle is displayed when a player sinks in powder snow.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A small white snowflake.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SNOWFLAKE(version -> version < 17 ? "NONE" : "snowflake", DIRECTIONAL),
/**
* This particle is unused and is merged into "poof" in 1.13.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Tiny white cloud.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SNOW_SHOVEL(version -> version < 8 ? "NONE" : (version < 13 ? "SNOW_SHOVEL" : "poof"), DIRECTIONAL),
/**
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A blue explosion.</li>
* <li>Speed value: Doesn't influence the particle.</li>
* </ul>
*/
SONIC_BOOM(version -> version < 19 ? "NONE" : "sonic_boom"),
/**
* In vanilla, this particle is displayed when a player walks
* on soulsand with the soul speed enchantment.
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: A soul.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SOUL(version -> version < 16 ? "NONE" : "soul", DIRECTIONAL),
/**
* In vanilla, this particle is displayed by soul torches
* <p>
* <b>Information</b>:
* <ul>
* <li>Appearance: Blue flame.</li>
* <li>Speed value: Influences the velocity at which the particle flies off.</li>
* <li>Extra: The velocity of this particle can be set. The amount has to be 0.</li>
* </ul>
*/
SOUL_FIRE_FLAME(version -> version < 16 ? "NONE" : "soul_fire_flame", DIRECTIONAL),
/**
* In vanilla, this particle is displayed when a splash potion or
* an experience bottle hits a block or an entity. It's also displayed by
* evokers.
* <p>