mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-16 08:56:04 +01:00
Lombokify some more getters
This commit is contained in:
@@ -7,6 +7,7 @@ import java.util.stream.Stream;
|
||||
import emu.grasscutter.utils.Utils;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import lombok.Getter;
|
||||
|
||||
public enum ElementType {
|
||||
None (0, FightProperty.FIGHT_PROP_CUR_FIRE_ENERGY, FightProperty.FIGHT_PROP_MAX_FIRE_ENERGY),
|
||||
@@ -21,12 +22,12 @@ public enum ElementType {
|
||||
AntiFire (9, FightProperty.FIGHT_PROP_CUR_FIRE_ENERGY, FightProperty.FIGHT_PROP_MAX_FIRE_ENERGY),
|
||||
Default (255, FightProperty.FIGHT_PROP_CUR_FIRE_ENERGY, FightProperty.FIGHT_PROP_MAX_FIRE_ENERGY, 10801, "TeamResonance_AllDifferent");
|
||||
|
||||
private final int value;
|
||||
private final int teamResonanceId;
|
||||
private final FightProperty curEnergyProp;
|
||||
private final FightProperty maxEnergyProp;
|
||||
private int depotValue;
|
||||
private final int configHash;
|
||||
@Getter private final int value;
|
||||
@Getter private final int teamResonanceId;
|
||||
@Getter private final FightProperty curEnergyProp;
|
||||
@Getter private final FightProperty maxEnergyProp;
|
||||
@Getter private int depotValue;
|
||||
@Getter private final int configHash;
|
||||
private static final Int2ObjectMap<ElementType> map = new Int2ObjectOpenHashMap<>();
|
||||
private static final Map<String, ElementType> stringMap = new HashMap<>();
|
||||
|
||||
@@ -58,30 +59,6 @@ public enum ElementType {
|
||||
this.depotValue = depotValue;
|
||||
}
|
||||
|
||||
public int getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public FightProperty getCurEnergyProp() {
|
||||
return curEnergyProp;
|
||||
}
|
||||
|
||||
public FightProperty getMaxEnergyProp() {
|
||||
return maxEnergyProp;
|
||||
}
|
||||
|
||||
public int getDepotValue() {
|
||||
return depotValue;
|
||||
}
|
||||
|
||||
public int getTeamResonanceId() {
|
||||
return teamResonanceId;
|
||||
}
|
||||
|
||||
public int getConfigHash() {
|
||||
return configHash;
|
||||
}
|
||||
|
||||
public static ElementType getTypeByValue(int value) {
|
||||
return map.getOrDefault(value, None);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user