Revert final's added by 15e2f3ca34 (#2144)

* Revert final's added by 15e2f3ca34

* Apply suggestions from code review

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>

---------

Co-authored-by: Magix <27646710+KingRainbow44@users.noreply.github.com>
This commit is contained in:
scooterboo 2023-05-06 23:39:16 -07:00 committed by GitHub
parent d18b4ffdd4
commit c832c1cac0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 1702 additions and 1702 deletions

View File

@ -477,8 +477,8 @@ public final class GameData {
private static final Int2IntMap trialAvatarIndexIdTrialActivityDataDataMap =
new Int2IntOpenHashMap();
private static final Map<Integer, List<Integer>> fetters = new HashMap<>();
private static final Map<Integer, List<ShopGoodsData>> shopGoods = new HashMap<>();
private static Map<Integer, List<Integer>> fetters = new HashMap<>();
private static Map<Integer, List<ShopGoodsData>> shopGoods = new HashMap<>();
// Getters with different names that stay for now
public static Int2ObjectMap<MainQuestData> getMainQuestDataMap() {

View File

@ -19,17 +19,17 @@ import lombok.Setter;
public class GameDepot {
public static final int[] BLOCK_SIZE = new int[] {50, 500}; // Scales
private static final Int2ObjectMap<WeightedList<ReliquaryMainPropData>> relicRandomMainPropDepot =
private static Int2ObjectMap<WeightedList<ReliquaryMainPropData>> relicRandomMainPropDepot =
new Int2ObjectOpenHashMap<>();
private static final Int2ObjectMap<List<ReliquaryMainPropData>> relicMainPropDepot =
private static Int2ObjectMap<List<ReliquaryMainPropData>> relicMainPropDepot =
new Int2ObjectOpenHashMap<>();
private static final Int2ObjectMap<List<ReliquaryAffixData>> relicAffixDepot =
private static Int2ObjectMap<List<ReliquaryAffixData>> relicAffixDepot =
new Int2ObjectOpenHashMap<>();
@Getter @Setter private static Map<String, AvatarConfig> playerAbilities = new HashMap<>();
@Getter
private static final HashMap<SpawnDataEntry.GridBlockId, ArrayList<SpawnDataEntry>> spawnLists =
private static HashMap<SpawnDataEntry.GridBlockId, ArrayList<SpawnDataEntry>> spawnLists =
new HashMap<>();
@Getter @Setter private static BlossomConfig blossomConfig;

View File

@ -52,8 +52,8 @@ public class OpenConfigEntry {
}
public static class SkillPointModifier {
private final int skillId;
private final int delta;
private int skillId;
private int delta;
public SkillPointModifier(int skillId, int delta) {
this.skillId = skillId;

View File

@ -31,7 +31,7 @@ public class ItemData extends GameResource {
@Getter(onMethod_ = @Override)
private int id;
private final int stackLimit = 1;
private int stackLimit = 1;
private int maxUseCount;
private int rankLevel;
private String effectName;
@ -43,7 +43,7 @@ public class ItemData extends GameResource {
private int[] destroyReturnMaterialCount;
// Enums
private final ItemType itemType = ItemType.ITEM_NONE;
private ItemType itemType = ItemType.ITEM_NONE;
private MaterialType materialType = MaterialType.MATERIAL_NONE;
private EquipType equipType = EquipType.EQUIP_NONE;
private String effectType;

View File

@ -10,7 +10,7 @@ public class PlayerLevelData extends GameResource {
private int level;
private int exp;
private int rewardId;
private final int expeditionLimitAdd = 0;
private int expeditionLimitAdd = 0;
private int unlockWorldLevel;
private long unlockDescTextMapHash;

View File

@ -18,7 +18,7 @@ public class AchievementData extends GameResource {
private static final AtomicBoolean isDivided = new AtomicBoolean();
private int goalId;
private int preStageAchievementId;
private final Set<Integer> groupAchievementIdList = new HashSet<>();
private Set<Integer> groupAchievementIdList = new HashSet<>();
private boolean isParent;
private long titleTextMapHash;
private long descTextMapHash;

View File

@ -26,7 +26,7 @@ public class Account {
private String token;
private String sessionKey; // Session token for dispatch server
private final List<String> permissions;
private List<String> permissions;
private Locale locale;
private String banReason;

View File

@ -12,7 +12,7 @@ import java.util.Map;
public class HealAbilityManager {
ArrayList<HealDataAvatar> healDataAvatarList;
private final Player player;
private Player player;
public HealAbilityManager(Player player) {
this.player = player;

View File

@ -10,8 +10,8 @@ import lombok.Setter;
@Getter
public class Achievement {
@Setter private StatusOuterClass.Status status;
private final int id;
private final int totalProgress;
private int id;
private int totalProgress;
@Setter private int curProgress;
@Setter private int finishTimestampSec;

View File

@ -74,13 +74,13 @@ public class Avatar {
private List<Integer> fetters;
private final Map<Integer, Integer> skillLevelMap = new Int2IntArrayMap(7); // Talent levels
private Map<Integer, Integer> skillLevelMap = new Int2IntArrayMap(7); // Talent levels
@Transient @Getter
private final Map<Integer, Integer> skillExtraChargeMap = new Int2IntArrayMap(2); // Charges
private Map<Integer, Integer> skillExtraChargeMap = new Int2IntArrayMap(2); // Charges
@Transient
private final Map<Integer, Integer> proudSkillBonusMap =
private Map<Integer, Integer> proudSkillBonusMap =
new Int2IntArrayMap(2); // Talent bonus levels (from const)
@Getter private int skillDepotId;

View File

@ -26,15 +26,15 @@ public class EntityClientGadget extends EntityBaseGadget {
@Getter private final Player owner;
@Getter(onMethod_ = @Override)
private final int gadgetId;
private int gadgetId;
@Getter private final int campId;
@Getter private final int campType;
@Getter private final int ownerEntityId;
@Getter private final int targetEntityId;
@Getter private final boolean asyncLoad;
@Getter private int campId;
@Getter private int campType;
@Getter private int ownerEntityId;
@Getter private int targetEntityId;
@Getter private boolean asyncLoad;
@Getter private final int originalOwnerEntityId;
@Getter private int originalOwnerEntityId;
public EntityClientGadget(Scene scene, Player player, EvtCreateGadgetNotify notify) {
super(scene, new Position(notify.getInitPos()), new Position(notify.getInitEulerAngles()));

View File

@ -66,7 +66,7 @@ public class EntityGadget extends EntityBaseGadget {
private final Int2FloatMap fightProperties = new Int2FloatOpenHashMap();
@Getter @Setter private SceneGadget metaGadget;
@Nullable @Getter private ConfigEntityGadget configGadget;
@Nullable @Getter ConfigEntityGadget configGadget;
@Getter @Setter private BaseRoute routeConfig;
@Getter @Setter private int stopValue = 0; // Controller related, inited to zero

View File

@ -42,7 +42,7 @@ public class EntityVehicle extends EntityBaseGadget {
@Getter private final int gadgetId;
@Getter @Setter private float curStamina;
@Getter private final List<VehicleMember> vehicleMembers;
@Getter private List<VehicleMember> vehicleMembers;
@Nullable @Getter private ConfigEntityGadget configGadget;
public EntityVehicle(

View File

@ -39,24 +39,24 @@ public class GachaBanner {
@Getter private String previewPrefabPath;
@Getter private String titlePath;
private int costItemId = 0;
private final int costItemAmount = 1;
private int costItemAmount = 1;
private int costItemId10 = 0;
private final int costItemAmount10 = 10;
@Getter private final int beginTime = 0;
@Getter private final int endTime = 1924992000;
@Getter private final int gachaTimesLimit = Integer.MAX_VALUE;
@Getter private final int[] rateUpItems4 = {};
@Getter private final int[] rateUpItems5 = {};
private int costItemAmount10 = 10;
@Getter private int beginTime = 0;
@Getter private int endTime = 1924992000;
@Getter private int gachaTimesLimit = Integer.MAX_VALUE;
@Getter private int[] rateUpItems4 = {};
@Getter private int[] rateUpItems5 = {};
// This now handles default values for the fields below
@Getter private final BannerType bannerType = BannerType.STANDARD;
@Getter private BannerType bannerType = BannerType.STANDARD;
// These don't change between banner types (apart from Standard having three extra 4star avatars)
@Getter
private final int[] fallbackItems3 = {
private int[] fallbackItems3 = {
11301, 11302, 11306, 12301, 12302, 12305, 13303, 14301, 14302, 14304, 15301, 15302, 15304
};
@Getter private final int[] fallbackItems4Pool1 = DEFAULT_FALLBACK_ITEMS_4_POOL_1;
@Getter private final int[] fallbackItems4Pool2 = DEFAULT_FALLBACK_ITEMS_4_POOL_2;
@Getter private int[] fallbackItems4Pool1 = DEFAULT_FALLBACK_ITEMS_4_POOL_1;
@Getter private int[] fallbackItems4Pool2 = DEFAULT_FALLBACK_ITEMS_4_POOL_2;
// Different banner types have different defaults, see above for default values and the enum for
// which are used where.
@Getter private int[] fallbackItems5Pool1;
@ -66,33 +66,33 @@ public class GachaBanner {
private int eventChance4 = -1; // Chance to win a featured event item
private int eventChance5 = -1; // Chance to win a featured event item
//
@Getter private final boolean removeC6FromPool = false;
@Getter private boolean removeC6FromPool = false;
@Getter
private final boolean autoStripRateUpFromFallback =
private boolean autoStripRateUpFromFallback =
true; // Ensures that featured items won't "double dip" into the losing pool
private final int[][] poolBalanceWeights4 = {
private int[][] poolBalanceWeights4 = {
{1, 255}, {17, 255}, {21, 10455}
}; // Used to ensure that players won't go too many rolls without getting something from pool 1
// (avatar) or pool 2 (weapon)
private final int[][] poolBalanceWeights5 = {{1, 30}, {147, 150}, {181, 10230}};
@Getter private final int wishMaxProgress = 2;
private int[][] poolBalanceWeights5 = {{1, 30}, {147, 150}, {181, 10230}};
@Getter private int wishMaxProgress = 2;
// Deprecated fields that were tolerated in early May 2022 but have apparently still being
// circulating in new custom configs
// For now, throw up big scary errors on load telling people that they will be banned outright in
// a future version
@Deprecated private final int[] rateUpItems1 = {};
@Deprecated private final int[] rateUpItems2 = {};
@Deprecated private final int eventChance = -1;
@Deprecated private final int costItem = 0;
@Deprecated private final int softPity = -1;
@Deprecated private final int hardPity = -1;
@Deprecated private final int minItemType = -1;
@Deprecated private final int maxItemType = -1;
@Deprecated private int[] rateUpItems1 = {};
@Deprecated private int[] rateUpItems2 = {};
@Deprecated private int eventChance = -1;
@Deprecated private int costItem = 0;
@Deprecated private int softPity = -1;
@Deprecated private int hardPity = -1;
@Deprecated private int minItemType = -1;
@Deprecated private int maxItemType = -1;
@Getter private boolean deprecated = false;
@Getter private final boolean disabled = false;
@Getter private boolean disabled = false;
private void warnDeprecated(String name, String replacement) {
Grasscutter.getLogger()

View File

@ -11,9 +11,9 @@ public class MapMark {
private int sceneId;
private String name;
private Position position;
private final MapMarkPointType mapMarkPointType;
private MapMarkPointType mapMarkPointType;
private int monsterId;
private final MapMarkFromType mapMarkFromType;
private MapMarkFromType mapMarkFromType;
private int questId;
@Deprecated // Morhpia

View File

@ -17,14 +17,14 @@ public class PlayerCodex {
@Transient private Player player;
// itemId is not codexId!
@Getter private final Set<Integer> unlockedWeapon;
@Getter private final Map<Integer, Integer> unlockedAnimal;
@Getter private final Set<Integer> unlockedMaterial;
@Getter private final Set<Integer> unlockedBook;
@Getter private final Set<Integer> unlockedTip;
@Getter private final Set<Integer> unlockedView;
@Getter private Set<Integer> unlockedWeapon;
@Getter private Map<Integer, Integer> unlockedAnimal;
@Getter private Set<Integer> unlockedMaterial;
@Getter private Set<Integer> unlockedBook;
@Getter private Set<Integer> unlockedTip;
@Getter private Set<Integer> unlockedView;
@Getter private Set<Integer> unlockedReliquary;
@Getter private final Set<Integer> unlockedReliquarySuitCodex;
@Getter private Set<Integer> unlockedReliquarySuitCodex;
public PlayerCodex() {
this.unlockedWeapon = new HashSet<>();

View File

@ -11,7 +11,7 @@ import java.util.List;
@Entity
public final class TeamInfo {
private String name;
private final List<Integer> avatars;
private List<Integer> avatars;
public TeamInfo() {
this.name = "";

View File

@ -36,10 +36,10 @@ public class SpawnDataEntry {
}
public static class GridBlockId {
@Getter private final int sceneId;
@Getter private final int scale;
@Getter private final int x;
@Getter private final int z;
@Getter private int sceneId;
@Getter private int scale;
@Getter private int x;
@Getter private int z;
public GridBlockId(int sceneId, int scale, int x, int z) {
this.sceneId = sceneId;

View File

@ -37,12 +37,12 @@ public class World implements Iterable<Player> {
@Getter private final List<Player> players;
@Getter private final Int2ObjectMap<Scene> scenes;
@Getter private final int levelEntityId;
@Getter private int levelEntityId;
private int nextEntityId = 0;
private int nextPeerId = 0;
private int worldLevel;
private final boolean isMultiplayer;
private boolean isMultiplayer;
private long lastUpdateTime;
@Getter private int tickCount = 0;

View File

@ -36,10 +36,10 @@ public class ScriptLoader {
@Getter private static ScriptLib scriptLib;
@Getter private static LuaValue scriptLibLua;
/** suggest GC to remove it if the memory is less */
private static final Map<String, SoftReference<CompiledScript>> scriptsCache =
private static Map<String, SoftReference<CompiledScript>> scriptsCache =
new ConcurrentHashMap<>();
/** sceneId - SceneMeta */
private static final Map<Integer, SoftReference<SceneMeta>> sceneMetaCache =
private static Map<Integer, SoftReference<SceneMeta>> sceneMetaCache =
new ConcurrentHashMap<>();
public static synchronized void init() throws Exception {

View File

@ -57,7 +57,7 @@ public class TsvUtils {
private static final Function<String, Object> parseLong =
value -> (long) Double.parseDouble(value); // Long::parseLong;
private static final Map<Class<?>, Function<String, Object>> enumTypeParsers = new HashMap<>();
private static final Map<Type, Function<String, Object>> primitiveTypeParsers =
private final static Map<Type, Function<String, Object>> primitiveTypeParsers =
Map.ofEntries(
Map.entry(String.class, parseString),
Map.entry(Integer.class, parseInt),
@ -72,7 +72,7 @@ public class TsvUtils {
Map.entry(boolean.class, Boolean::parseBoolean));
private static final Map<Type, Function<String, Object>> typeParsers =
new HashMap<>(primitiveTypeParsers);
private static final Map<Class<?>, Map<String, FieldParser>> cachedClassFieldMaps =
private final static Map<Class<?>, Map<String, FieldParser>> cachedClassFieldMaps =
new HashMap<>();
@SuppressWarnings("unchecked")