mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2026-05-16 16:52:35 +08:00
Fix whitespace [skip actions]
This commit is contained in:
@@ -12,25 +12,25 @@ public enum ItemUseTarget {
|
||||
ITEM_USE_TARGET_SPECIFY_AVATAR (3),
|
||||
ITEM_USE_TARGET_SPECIFY_ALIVE_AVATAR (4),
|
||||
ITEM_USE_TARGET_SPECIFY_DEAD_AVATAR (5);
|
||||
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<ItemUseTarget> map = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
static {
|
||||
Stream.of(values()).forEach(e -> {
|
||||
map.put(e.getValue(), e);
|
||||
});
|
||||
}
|
||||
|
||||
private ItemUseTarget(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static ItemUseTarget getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, ITEM_USE_TARGET_NONE);
|
||||
}
|
||||
private final int value;
|
||||
private static final Int2ObjectMap<ItemUseTarget> map = new Int2ObjectOpenHashMap<>();
|
||||
|
||||
static {
|
||||
Stream.of(values()).forEach(e -> {
|
||||
map.put(e.getValue(), e);
|
||||
});
|
||||
}
|
||||
|
||||
private ItemUseTarget(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static ItemUseTarget getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, ITEM_USE_TARGET_NONE);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user