37 lines
916 B
Java
37 lines
916 B
Java
package net.minecraft.client;
|
|
|
|
import java.util.function.IntFunction;
|
|
import net.fabricmc.api.EnvType;
|
|
import net.fabricmc.api.Environment;
|
|
import net.minecraft.util.ByIdMap;
|
|
import net.minecraft.util.OptionEnum;
|
|
|
|
@Environment(EnvType.CLIENT)
|
|
public enum ParticleStatus implements OptionEnum {
|
|
ALL(0, "options.particles.all"),
|
|
DECREASED(1, "options.particles.decreased"),
|
|
MINIMAL(2, "options.particles.minimal");
|
|
|
|
private static final IntFunction<ParticleStatus> BY_ID = ByIdMap.continuous(ParticleStatus::getId, values(), ByIdMap.OutOfBoundsStrategy.WRAP);
|
|
private final int id;
|
|
private final String key;
|
|
|
|
private ParticleStatus(final int id, final String key) {
|
|
this.id = id;
|
|
this.key = key;
|
|
}
|
|
|
|
@Override
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
@Override
|
|
public int getId() {
|
|
return this.id;
|
|
}
|
|
|
|
public static ParticleStatus byId(int id) {
|
|
return (ParticleStatus)BY_ID.apply(id);
|
|
}
|
|
}
|