37 lines
1,008 B
Java
37 lines
1,008 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 PrioritizeChunkUpdates implements OptionEnum {
|
|
NONE(0, "options.prioritizeChunkUpdates.none"),
|
|
PLAYER_AFFECTED(1, "options.prioritizeChunkUpdates.byPlayer"),
|
|
NEARBY(2, "options.prioritizeChunkUpdates.nearby");
|
|
|
|
private static final IntFunction<PrioritizeChunkUpdates> BY_ID = ByIdMap.continuous(PrioritizeChunkUpdates::getId, values(), ByIdMap.OutOfBoundsStrategy.WRAP);
|
|
private final int id;
|
|
private final String key;
|
|
|
|
private PrioritizeChunkUpdates(final int id, final String key) {
|
|
this.id = id;
|
|
this.key = key;
|
|
}
|
|
|
|
@Override
|
|
public int getId() {
|
|
return this.id;
|
|
}
|
|
|
|
@Override
|
|
public String getKey() {
|
|
return this.key;
|
|
}
|
|
|
|
public static PrioritizeChunkUpdates byId(int id) {
|
|
return (PrioritizeChunkUpdates)BY_ID.apply(id);
|
|
}
|
|
}
|