EnumParticleTypes .java

net.minecraft.util.EnumParticleTypes (enum): members: EXPLOSION_NORMAL, EXPLOSION_LARGE, EXPLOSION_HUGE, FIREWORKS_SPARK, WATER_BUBBLE, WATER_SPLASH, CRIT.

net.minecraft.utilenum127 linescommon3.8 KB

API Surface (7)

String[] getParticleNames()
String getParticleName()
int getParticleID()
int getArgumentCount()
boolean getShouldIgnoreRange()
boolean hasArguments()
EnumParticleTypes getParticleFromId(int particleId)

Fields & Constants (6)

PARTICLES
PARTICLE_NAMES
particleName
particleID
shouldIgnoreRange
argumentCount

String literals (42)

"explode"
"largeexplode"
"hugeexplosion"
"fireworksSpark"
"bubble"
"splash"
"wake"
"suspended"
"depthsuspend"
"crit"
"magicCrit"
"smoke"
"largesmoke"
"spell"
"instantSpell"
"mobSpell"
"mobSpellAmbient"
"witchMagic"
"dripWater"
"dripLava"
"angryVillager"
"happyVillager"
"townaura"
"note"

Full Source

EnumParticleTypes.java127 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.util;
2
3
import com.google.common.collect.Lists;
4
import com.google.common.collect.Maps;
5
import java.util.List;
6
import java.util.Map;
7
8
public enum EnumParticleTypes
9
{
10
    EXPLOSION_NORMAL("explode", 0, true),
11
    EXPLOSION_LARGE("largeexplode", 1, true),
12
    EXPLOSION_HUGE("hugeexplosion", 2, true),
13
    FIREWORKS_SPARK("fireworksSpark", 3, false),
14
    WATER_BUBBLE("bubble", 4, false),
15
    WATER_SPLASH("splash", 5, false),
16
    WATER_WAKE("wake", 6, false),
17
    SUSPENDED("suspended", 7, false),
18
    SUSPENDED_DEPTH("depthsuspend", 8, false),
19
    CRIT("crit", 9, false),
20
    CRIT_MAGIC("magicCrit", 10, false),
21
    SMOKE_NORMAL("smoke", 11, false),
22
    SMOKE_LARGE("largesmoke", 12, false),
23
    SPELL("spell", 13, false),
24
    SPELL_INSTANT("instantSpell", 14, false),
25
    SPELL_MOB("mobSpell", 15, false),
26
    SPELL_MOB_AMBIENT("mobSpellAmbient", 16, false),
27
    SPELL_WITCH("witchMagic", 17, false),
28
    DRIP_WATER("dripWater", 18, false),
29
    DRIP_LAVA("dripLava", 19, false),
30
    VILLAGER_ANGRY("angryVillager", 20, false),
31
    VILLAGER_HAPPY("happyVillager", 21, false),
32
    TOWN_AURA("townaura", 22, false),
33
    NOTE("note", 23, false),
34
    PORTAL("portal", 24, false),
35
    ENCHANTMENT_TABLE("enchantmenttable", 25, false),
36
    FLAME("flame", 26, false),
37
    LAVA("lava", 27, false),
38
    FOOTSTEP("footstep", 28, false),
39
    CLOUD("cloud", 29, false),
40
    REDSTONE("reddust", 30, false),
41
    SNOWBALL("snowballpoof", 31, false),
42
    SNOW_SHOVEL("snowshovel", 32, false),
43
    SLIME("slime", 33, false),
44
    HEART("heart", 34, false),
45
    BARRIER("barrier", 35, false),
46
    ITEM_CRACK("iconcrack_", 36, false, 2),
47
    BLOCK_CRACK("blockcrack_", 37, false, 1),
48
    BLOCK_DUST("blockdust_", 38, false, 1),
49
    WATER_DROP("droplet", 39, false),
50
    ITEM_TAKE("take", 40, false),
51
    MOB_APPEARANCE("mobappearance", 41, true);
52
53
    private final String particleName;
54
    private final int particleID;
55
    private final boolean shouldIgnoreRange;
56
    private final int argumentCount;
57
    private static final Map<Integer, EnumParticleTypes> PARTICLES = Maps.<Integer, EnumParticleTypes>newHashMap();
58
    private static final String[] PARTICLE_NAMES;
59
60
    private EnumParticleTypes(String particleNameIn, int particleIDIn, boolean p_i46011_5_, int argumentCountIn)
61
    {
62
        this.particleName = particleNameIn;
63
        this.particleID = particleIDIn;
64
        this.shouldIgnoreRange = p_i46011_5_;
65
        this.argumentCount = argumentCountIn;
66
    }
67
68
    private EnumParticleTypes(String particleNameIn, int particleIDIn, boolean p_i46012_5_)
69
    {
70
        this(particleNameIn, particleIDIn, p_i46012_5_, 0);
71
    }
72
73
    public static String[] getParticleNames()
74
    {
75
        return PARTICLE_NAMES;
76
    }
77
78
    public String getParticleName()
79
    {
80
        return this.particleName;
81
    }
82
83
    public int getParticleID()
84
    {
85
        return this.particleID;
86
    }
87
88
    public int getArgumentCount()
89
    {
90
        return this.argumentCount;
91
    }
92
93
    public boolean getShouldIgnoreRange()
94
    {
95
        return this.shouldIgnoreRange;
96
    }
97
98
    public boolean hasArguments()
99
    {
100
        return this.argumentCount > 0;
101
    }
102
103
    /**
104
     * Gets the relative EnumParticleTypes by id.
105
     */
106
    public static EnumParticleTypes getParticleFromId(int particleId)
107
    {
108
        return (EnumParticleTypes)PARTICLES.get(Integer.valueOf(particleId));
109
    }
110
111
    static {
112
        List<String> list = Lists.<String>newArrayList();
113
114
        for (EnumParticleTypes enumparticletypes : values())
115
        {
116
            PARTICLES.put(Integer.valueOf(enumparticletypes.getParticleID()), enumparticletypes);
117
118
            if (!enumparticletypes.getParticleName().endsWith("_"))
119
            {
120
                list.add(enumparticletypes.getParticleName());
121
            }
122
        }
123
124
        PARTICLE_NAMES = (String[])list.toArray(new String[list.size()]);
125
    }
126
}
127

Deobfuscated MCP 1.8.9 source of EnumParticleTypes from Marcelektro/MavenMCP-1.8.9 (net/minecraft/util/EnumParticleTypes.java), stored verbatim.