Fix people being able to crash with deprecated particle types

This commit is contained in:
libraryaddict 2024-10-05 18:18:35 +13:00
parent 69e1d52785
commit 1375095638

View File

@ -113,7 +113,8 @@ public class ParamInfoParticle extends ParamInfoEnum {
for (Field field : ParticleTypes.class.getFields()) {
int mods = field.getModifiers();
if (!Modifier.isFinal(mods) || !Modifier.isPublic(mods) || !Modifier.isStatic(mods)) {
if (!Modifier.isFinal(mods) || !Modifier.isPublic(mods) || !Modifier.isStatic(mods) ||
field.isAnnotationPresent(Deprecated.class)) {
continue;
}