Run Spotless on src/main

This commit is contained in:
KingRainbow44
2023-03-31 22:30:45 -04:00
Unverified
parent 99822b0e22
commit fc05602128
1003 changed files with 60650 additions and 58050 deletions
@@ -1,71 +1,72 @@
package emu.grasscutter.game.props;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;
public enum EnterReason {
None(0),
Login(1),
DungeonReplay(11),
DungeonReviveOnWaypoint(12),
DungeonEnter(13),
DungeonQuit(14),
Gm(21),
QuestRollback(31),
Revival(32),
PersonalScene(41),
TransPoint(42),
ClientTransmit(43),
ForceDragBack(44),
TeamKick(51),
TeamJoin(52),
TeamBack(53),
Muip(54),
DungeonInviteAccept(55),
Lua(56),
ActivityLoadTerrain(57),
HostFromSingleToMp(58),
MpPlay(59),
AnchorPoint(60),
LuaSkipUi(61),
ReloadTerrain(62),
DraftTransfer(63),
EnterHome(64),
ExitHome(65),
ChangeHomeModule(66),
Gallery(67),
HomeSceneJump(68),
HideAndSeek(69);
private static final Int2ObjectMap<EnterReason> map = new Int2ObjectOpenHashMap<>();
private static final Map<String, EnterReason> stringMap = new HashMap<>();
static {
Stream.of(values()).forEach(e -> {
map.put(e.getValue(), e);
stringMap.put(e.name(), e);
});
}
private final int value;
EnterReason(int value) {
this.value = value;
}
public static EnterReason getTypeByValue(int value) {
return map.getOrDefault(value, None);
}
public static EnterReason getTypeByName(String name) {
return stringMap.getOrDefault(name, None);
}
public int getValue() {
return value;
}
}
package emu.grasscutter.game.props;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import java.util.HashMap;
import java.util.Map;
import java.util.stream.Stream;
public enum EnterReason {
None(0),
Login(1),
DungeonReplay(11),
DungeonReviveOnWaypoint(12),
DungeonEnter(13),
DungeonQuit(14),
Gm(21),
QuestRollback(31),
Revival(32),
PersonalScene(41),
TransPoint(42),
ClientTransmit(43),
ForceDragBack(44),
TeamKick(51),
TeamJoin(52),
TeamBack(53),
Muip(54),
DungeonInviteAccept(55),
Lua(56),
ActivityLoadTerrain(57),
HostFromSingleToMp(58),
MpPlay(59),
AnchorPoint(60),
LuaSkipUi(61),
ReloadTerrain(62),
DraftTransfer(63),
EnterHome(64),
ExitHome(65),
ChangeHomeModule(66),
Gallery(67),
HomeSceneJump(68),
HideAndSeek(69);
private static final Int2ObjectMap<EnterReason> map = new Int2ObjectOpenHashMap<>();
private static final Map<String, EnterReason> stringMap = new HashMap<>();
static {
Stream.of(values())
.forEach(
e -> {
map.put(e.getValue(), e);
stringMap.put(e.name(), e);
});
}
private final int value;
EnterReason(int value) {
this.value = value;
}
public static EnterReason getTypeByValue(int value) {
return map.getOrDefault(value, None);
}
public static EnterReason getTypeByName(String name) {
return stringMap.getOrDefault(name, None);
}
public int getValue() {
return value;
}
}