Lombokify some more getters

This commit is contained in:
AnimeGitB
2022-08-11 13:12:02 +09:30
parent 02deeb2852
commit 9e0d6538e9
3 changed files with 53 additions and 215 deletions

View File

@@ -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);
}