Spaces:
Build error
Build error
File size: 1,060 Bytes
d46f4a3 |
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 |
package net.minecraft.client;
import java.util.function.IntFunction;
import net.minecraft.util.ByIdMap;
import net.minecraft.util.OptionEnum;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@OnlyIn(Dist.CLIENT)
public enum AttackIndicatorStatus implements OptionEnum {
OFF(0, "options.off"),
CROSSHAIR(1, "options.attack.crosshair"),
HOTBAR(2, "options.attack.hotbar");
private static final IntFunction<AttackIndicatorStatus> BY_ID = ByIdMap.continuous(
AttackIndicatorStatus::getId, values(), ByIdMap.OutOfBoundsStrategy.WRAP
);
private final int id;
private final String key;
private AttackIndicatorStatus(final int p_90506_, final String p_90507_) {
this.id = p_90506_;
this.key = p_90507_;
}
@Override
public int getId() {
return this.id;
}
@Override
public String getKey() {
return this.key;
}
public static AttackIndicatorStatus byId(int p_90510_) {
return BY_ID.apply(p_90510_);
}
} |