From 7ee644c794c219bdc9bddcfb5d19a8fd39c02b5f Mon Sep 17 00:00:00 2001 From: "Breno A." Date: Sun, 9 Jun 2024 09:46:29 -0300 Subject: [PATCH] perf: add Serial annotation here --- .../java/emu/grasscutter/data/binout/AbilityMixinData.java | 3 +++ src/main/java/emu/grasscutter/data/binout/AbilityModifier.java | 3 +++ src/main/java/emu/grasscutter/game/world/GridPosition.java | 1 + src/main/java/emu/grasscutter/game/world/Position.java | 3 +++ 4 files changed, 10 insertions(+) diff --git a/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java b/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java index 6b4eb450f..9fa16b9ca 100644 --- a/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java +++ b/src/main/java/emu/grasscutter/data/binout/AbilityMixinData.java @@ -3,10 +3,13 @@ package emu.grasscutter.data.binout; import com.google.gson.*; import com.google.gson.annotations.SerializedName; import com.google.gson.reflect.TypeToken; + +import java.io.Serial; import java.io.Serializable; import java.util.*; public class AbilityMixinData implements Serializable { + @Serial private static final long serialVersionUID = -2001232313615923575L; public enum Type { diff --git a/src/main/java/emu/grasscutter/data/binout/AbilityModifier.java b/src/main/java/emu/grasscutter/data/binout/AbilityModifier.java index fe08cccf5..099bb49ce 100644 --- a/src/main/java/emu/grasscutter/data/binout/AbilityModifier.java +++ b/src/main/java/emu/grasscutter/data/binout/AbilityModifier.java @@ -3,10 +3,13 @@ package emu.grasscutter.data.binout; import com.google.gson.annotations.SerializedName; import emu.grasscutter.data.common.DynamicFloat; import emu.grasscutter.game.props.ElementType; + +import java.io.Serial; import java.io.Serializable; import lombok.ToString; public class AbilityModifier implements Serializable { + @Serial private static final long serialVersionUID = -2001232313615923575L; public State state; diff --git a/src/main/java/emu/grasscutter/game/world/GridPosition.java b/src/main/java/emu/grasscutter/game/world/GridPosition.java index b4a47b43c..bd0e2e2ed 100644 --- a/src/main/java/emu/grasscutter/game/world/GridPosition.java +++ b/src/main/java/emu/grasscutter/game/world/GridPosition.java @@ -8,6 +8,7 @@ import lombok.*; @Entity public final class GridPosition implements Serializable { + @Serial private static final long serialVersionUID = -2001232300615923575L; @Getter @Setter private int x; diff --git a/src/main/java/emu/grasscutter/game/world/Position.java b/src/main/java/emu/grasscutter/game/world/Position.java index 249f6733e..0c8483a13 100644 --- a/src/main/java/emu/grasscutter/game/world/Position.java +++ b/src/main/java/emu/grasscutter/game/world/Position.java @@ -5,6 +5,8 @@ import com.google.gson.annotations.SerializedName; import dev.morphia.annotations.Entity; import emu.grasscutter.net.proto.VectorOuterClass.Vector; import emu.grasscutter.utils.Utils; + +import java.io.Serial; import java.io.Serializable; import java.util.List; import lombok.*; @@ -13,6 +15,7 @@ import lombok.experimental.Accessors; @Entity @Accessors(chain = true) public class Position implements Serializable { + @Serial private static final long serialVersionUID = -2001232313615923575L; public static final Position ZERO = new Position(0, 0, 0);