Merge remote-tracking branch 'origin/development' into development

This commit is contained in:
KingRainbow44 2023-09-02 19:02:41 -04:00
commit 69a223949b
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE
597 changed files with 1884 additions and 1562 deletions

View File

@ -1,5 +1,8 @@
package emu.grasscutter;
import static emu.grasscutter.config.Configuration.SERVER;
import static emu.grasscutter.utils.lang.Language.translate;
import ch.qos.logback.classic.*;
import emu.grasscutter.auth.*;
import emu.grasscutter.command.*;
@ -18,20 +21,16 @@ import emu.grasscutter.tools.Tools;
import emu.grasscutter.utils.*;
import emu.grasscutter.utils.lang.Language;
import io.netty.util.concurrent.FastThreadLocalThread;
import java.io.*;
import java.util.Calendar;
import java.util.concurrent.*;
import javax.annotation.Nullable;
import lombok.*;
import org.jline.reader.*;
import org.jline.terminal.*;
import org.reflections.Reflections;
import org.slf4j.LoggerFactory;
import javax.annotation.Nullable;
import java.io.*;
import java.util.Calendar;
import java.util.concurrent.*;
import static emu.grasscutter.config.Configuration.SERVER;
import static emu.grasscutter.utils.lang.Language.translate;
public final class Grasscutter {
public static final File configFile = new File("./config.json");
public static final Reflections reflector = new Reflections("emu.grasscutter");
@ -211,11 +210,7 @@ public final class Grasscutter {
}
}
/**
* Utility method for starting the:
* - SDK server
* - Dispatch server
*/
/** Utility method for starting the: - SDK server - Dispatch server */
public static void startDispatch() throws Exception {
httpServer.start(); // Start the SDK/HTTP server.

View File

@ -4,9 +4,8 @@ import emu.grasscutter.game.Account;
import emu.grasscutter.server.http.objects.*;
import emu.grasscutter.utils.DispatchUtils;
import io.javalin.http.Context;
import lombok.*;
import javax.annotation.Nullable;
import lombok.*;
/** Defines an authenticator for the server. Can be changed by plugins. */
public interface AuthenticationSystem {

View File

@ -1,13 +1,13 @@
package emu.grasscutter.auth;
import static emu.grasscutter.config.Configuration.ACCOUNT;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.auth.DefaultAuthenticators.*;
import emu.grasscutter.game.Account;
import emu.grasscutter.server.http.objects.*;
import static emu.grasscutter.config.Configuration.ACCOUNT;
import static emu.grasscutter.utils.lang.Language.translate;
/**
* The default Grasscutter authentication implementation. Allows all users to access any account.
*/

View File

@ -1,5 +1,8 @@
package emu.grasscutter.auth;
import static emu.grasscutter.config.Configuration.ACCOUNT;
import static emu.grasscutter.utils.lang.Language.translate;
import at.favre.lib.crypto.bcrypt.BCrypt;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.Grasscutter.ServerRunMode;
@ -10,16 +13,12 @@ import emu.grasscutter.server.dispatch.*;
import emu.grasscutter.server.http.objects.*;
import emu.grasscutter.utils.*;
import io.javalin.http.ContentType;
import javax.crypto.Cipher;
import java.nio.charset.StandardCharsets;
import java.security.KeyFactory;
import java.security.interfaces.RSAPrivateKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.concurrent.*;
import static emu.grasscutter.config.Configuration.ACCOUNT;
import static emu.grasscutter.utils.lang.Language.translate;
import javax.crypto.Cipher;
/** A class containing default authenticators. */
public final class DefaultAuthenticators {

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.event.game.ReceiveCommandFeedbackEvent;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
public interface CommandHandler {
/**

View File

@ -1,9 +1,9 @@
package emu.grasscutter.command;
import javax.annotation.Nonnull;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.*;
import javax.annotation.Nonnull;
public class CommandHelpers {
public static final Pattern lvlRegex =

View File

@ -1,15 +1,14 @@
package emu.grasscutter.command;
import static emu.grasscutter.config.Configuration.SERVER;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.database.DatabaseHelper;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.event.game.ExecuteCommandEvent;
import it.unimi.dsi.fastutil.objects.*;
import org.reflections.Reflections;
import java.util.*;
import static emu.grasscutter.config.Configuration.SERVER;
import org.reflections.Reflections;
@SuppressWarnings({"UnusedReturnValue", "unused"})
public final class CommandMap {

View File

@ -1,5 +1,7 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import at.favre.lib.crypto.bcrypt.BCrypt;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
@ -7,12 +9,9 @@ import emu.grasscutter.config.Configuration;
import emu.grasscutter.database.*;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.player.Player;
import java.util.List;
import java.util.stream.Collectors;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "account",
usage = {

View File

@ -5,7 +5,6 @@ import emu.grasscutter.data.GameData;
import emu.grasscutter.data.excels.achievement.AchievementData;
import emu.grasscutter.game.achievement.*;
import emu.grasscutter.game.player.Player;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.packet.send.PacketServerAnnounceNotify;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "announce",
usage = {"<content>", "refresh", "(tpl|revoke) <templateId>"},

View File

@ -4,7 +4,6 @@ import emu.grasscutter.command.*;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.game.GameSession;
import java.util.List;
@Command(

View File

@ -1,16 +1,15 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.command.CommandHelpers.*;
import emu.grasscutter.command.*;
import emu.grasscutter.game.inventory.*;
import emu.grasscutter.game.player.Player;
import lombok.Setter;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.Pattern;
import java.util.stream.Stream;
import static emu.grasscutter.command.CommandHelpers.*;
import lombok.Setter;
@Command(
label = "clear",

View File

@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
@Command(

View File

@ -3,9 +3,8 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.packet.send.PacketCutsceneBeginNotify;
import lombok.val;
import java.util.List;
import lombok.val;
@Command(
label = "cutscene",

View File

@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
@Command(

View File

@ -1,12 +1,11 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "enter_dungeon",
aliases = {"enterdungeon", "dungeon"},

View File

@ -1,5 +1,8 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.command.CommandHelpers.*;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.entity.*;
import emu.grasscutter.game.player.Player;
@ -7,14 +10,10 @@ import emu.grasscutter.game.props.*;
import emu.grasscutter.game.world.Scene;
import emu.grasscutter.server.event.entity.EntityDamageEvent;
import emu.grasscutter.server.packet.send.PacketEntityFightPropUpdateNotify;
import lombok.Setter;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.Pattern;
import static emu.grasscutter.command.CommandHelpers.*;
import static emu.grasscutter.utils.lang.Language.translate;
import lombok.Setter;
@Command(
label = "entity",

View File

@ -1,5 +1,8 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.GameConstants.*;
import static emu.grasscutter.command.CommandHelpers.*;
import emu.grasscutter.command.*;
import emu.grasscutter.data.*;
import emu.grasscutter.data.excels.ItemData;
@ -9,14 +12,10 @@ import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.game.inventory.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.*;
import lombok.Setter;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.Pattern;
import static emu.grasscutter.GameConstants.*;
import static emu.grasscutter.command.CommandHelpers.*;
import lombok.Setter;
@Command(
label = "give",

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.SceneGroupInstance;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "group",
aliases = {"gr"},

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.FightProperty;
import emu.grasscutter.server.packet.send.*;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "heal",
aliases = {"h"},

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.player.Player;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "help",
usage = {"[<command>]"},

View File

@ -2,7 +2,6 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
@Command(

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.entity.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.Scene;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "killall",
usage = {"[<sceneId>]"},

View File

@ -1,15 +1,14 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.entity.EntityAvatar;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.*;
import emu.grasscutter.server.packet.send.*;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "killCharacter",
aliases = {"suicide", "kill"},

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.utils.Utils;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "language",
usage = {"[<language code>]"},

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "list",
aliases = {"players"},

View File

@ -1,15 +1,14 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.command.Command.TargetRequirement;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.player.Player;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "permission",
usage = {"add <permission>", "remove <permission>", "clear", "list"},

View File

@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.Position;
import java.util.List;
@Command(

View File

@ -1,15 +1,14 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.quest.GameQuest;
import emu.grasscutter.game.quest.enums.*;
import java.util.*;
import java.util.stream.Collectors;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "quest",
aliases = {"q"},

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "reload",
permission = "server.reload",

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.game.entity.EntityAvatar;
import emu.grasscutter.game.player.Player;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "resetConst",
aliases = {"resetconstellation"},

View File

@ -1,12 +1,11 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "resetShopLimit",
aliases = {"resetshop"},

View File

@ -1,15 +1,14 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.database.DatabaseHelper;
import emu.grasscutter.game.mail.Mail;
import emu.grasscutter.game.player.Player;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
@SuppressWarnings("ConstantConditions")
@Command(
label = "sendMail",

View File

@ -4,7 +4,6 @@ import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.command.Command.TargetRequirement;
import emu.grasscutter.game.player.Player;
import java.util.List;
@Command(

View File

@ -6,7 +6,6 @@ import emu.grasscutter.game.entity.EntityAvatar;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.*;
import emu.grasscutter.server.packet.send.PacketSceneEntityAppearNotify;
import java.util.List;
@Command(

View File

@ -1,15 +1,14 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.data.GameData;
import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.packet.send.PacketAvatarFetterDataNotify;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "setFetterLevel",
usage = {"<level>"},

View File

@ -6,7 +6,6 @@ import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.PlayerProperty;
import emu.grasscutter.game.tower.TowerLevelRecord;
import emu.grasscutter.server.packet.send.*;
import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.stream.IntStream;

View File

@ -6,7 +6,6 @@ import emu.grasscutter.game.entity.EntityAvatar;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.FightProperty;
import emu.grasscutter.server.packet.send.PacketEntityFightPropUpdateNotify;
import java.util.*;
@Command(

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.Position;
import emu.grasscutter.server.packet.send.PacketScenePlayerSoundNotify;
import lombok.val;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
import lombok.val;
@Command(
label = "sound",

View File

@ -1,5 +1,9 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.command.CommandHelpers.*;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.data.GameData;
import emu.grasscutter.data.excels.*;
@ -8,15 +12,10 @@ import emu.grasscutter.game.entity.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.*;
import emu.grasscutter.game.world.*;
import lombok.Setter;
import java.util.*;
import java.util.function.BiConsumer;
import java.util.regex.Pattern;
import static emu.grasscutter.command.CommandHelpers.*;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
import static emu.grasscutter.utils.lang.Language.translate;
import lombok.Setter;
@Command(
label = "spawn",

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.Grasscutter;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "stop",
aliases = {"shutdown"},

View File

@ -6,7 +6,6 @@ import emu.grasscutter.data.excels.avatar.AvatarSkillDepotData;
import emu.grasscutter.game.avatar.Avatar;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.utils.lang.Language;
import java.util.List;
@Command(

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.packet.send.PacketChangeMpTeamAvatarRsp;
import java.util.*;
import static emu.grasscutter.config.Configuration.GAME_OPTIONS;
@Command(
label = "team",
usage = {"add <avatarId,...>", "(remove|set) [index|first|last|index-index,...]"},

View File

@ -1,13 +1,12 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "teleportAll",
aliases = {"tpall"},

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.world.Position;
import emu.grasscutter.server.event.player.PlayerTeleportEvent.TeleportType;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "teleport",
aliases = {"tp"},

View File

@ -1,16 +1,15 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.game.activity.trialavatar.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.ActivityType;
import emu.grasscutter.server.packet.send.PacketActivityInfoNotify;
import emu.grasscutter.utils.JsonUtils;
import java.util.List;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "trialAvatarActivity",
aliases = {"taa"},

View File

@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.*;
import emu.grasscutter.game.Account;
import emu.grasscutter.game.player.Player;
import java.util.List;
@Command(

View File

@ -1,14 +1,13 @@
package emu.grasscutter.command.commands;
import static emu.grasscutter.utils.lang.Language.translate;
import emu.grasscutter.command.*;
import emu.grasscutter.data.GameData;
import emu.grasscutter.game.player.*;
import emu.grasscutter.server.packet.send.PacketOpenStateChangeNotify;
import java.util.*;
import static emu.grasscutter.utils.lang.Language.translate;
@Command(
label = "unlockall",
usage = {""},

View File

@ -3,7 +3,6 @@ package emu.grasscutter.command.commands;
import emu.grasscutter.command.*;
import emu.grasscutter.game.player.Player;
import emu.grasscutter.game.props.ClimateType;
import java.util.List;
@Command(

View File

@ -1,12 +1,11 @@
package emu.grasscutter.config;
import emu.grasscutter.utils.FileUtils;
import static emu.grasscutter.Grasscutter.config;
import emu.grasscutter.utils.FileUtils;
import java.nio.file.Path;
import java.util.Locale;
import static emu.grasscutter.Grasscutter.config;
/**
* A data container for the server's configuration.
*

View File

@ -4,11 +4,10 @@ import emu.grasscutter.Grasscutter;
import emu.grasscutter.server.http.handlers.GachaHandler;
import emu.grasscutter.tools.Tools;
import emu.grasscutter.utils.*;
import lombok.val;
import java.io.*;
import java.nio.file.*;
import java.util.*;
import lombok.val;
public class DataLoader {

View File

@ -4,34 +4,54 @@ import emu.grasscutter.Grasscutter;
import emu.grasscutter.data.binout.*;
import emu.grasscutter.data.binout.config.*;
import emu.grasscutter.data.binout.routes.Route;
import emu.grasscutter.data.custom.*;
import emu.grasscutter.data.custom.TrialAvatarActivityCustomData;
import emu.grasscutter.data.custom.TrialAvatarCustomData;
import emu.grasscutter.data.excels.*;
import emu.grasscutter.data.excels.achievement.*;
import emu.grasscutter.data.excels.activity.*;
import emu.grasscutter.data.excels.achievement.AchievementData;
import emu.grasscutter.data.excels.achievement.AchievementGoalData;
import emu.grasscutter.data.excels.activity.ActivityCondExcelConfigData;
import emu.grasscutter.data.excels.activity.ActivityData;
import emu.grasscutter.data.excels.activity.ActivityShopData;
import emu.grasscutter.data.excels.activity.ActivityWatcherData;
import emu.grasscutter.data.excels.avatar.*;
import emu.grasscutter.data.excels.codex.*;
import emu.grasscutter.data.excels.dungeon.*;
import emu.grasscutter.data.excels.giving.*;
import emu.grasscutter.data.excels.monster.*;
import emu.grasscutter.data.excels.quest.*;
import emu.grasscutter.data.excels.reliquary.*;
import emu.grasscutter.data.excels.giving.GivingData;
import emu.grasscutter.data.excels.giving.GivingGroupData;
import emu.grasscutter.data.excels.monster.MonsterCurveData;
import emu.grasscutter.data.excels.monster.MonsterData;
import emu.grasscutter.data.excels.monster.MonsterDescribeData;
import emu.grasscutter.data.excels.monster.MonsterSpecialNameData;
import emu.grasscutter.data.excels.quest.QuestData;
import emu.grasscutter.data.excels.quest.QuestGlobalVarData;
import emu.grasscutter.data.excels.reliquary.ReliquaryAffixData;
import emu.grasscutter.data.excels.reliquary.ReliquaryLevelData;
import emu.grasscutter.data.excels.reliquary.ReliquaryMainPropData;
import emu.grasscutter.data.excels.reliquary.ReliquarySetData;
import emu.grasscutter.data.excels.scene.*;
import emu.grasscutter.data.excels.tower.*;
import emu.grasscutter.data.excels.tower.TowerFloorData;
import emu.grasscutter.data.excels.tower.TowerLevelData;
import emu.grasscutter.data.excels.tower.TowerScheduleData;
import emu.grasscutter.data.excels.trial.*;
import emu.grasscutter.data.excels.weapon.*;
import emu.grasscutter.data.excels.world.*;
import emu.grasscutter.data.excels.weapon.WeaponCurveData;
import emu.grasscutter.data.excels.weapon.WeaponLevelData;
import emu.grasscutter.data.excels.weapon.WeaponPromoteData;
import emu.grasscutter.data.excels.world.WeatherData;
import emu.grasscutter.data.excels.world.WorldAreaData;
import emu.grasscutter.data.excels.world.WorldLevelData;
import emu.grasscutter.data.server.*;
import emu.grasscutter.game.dungeons.DungeonDropEntry;
import emu.grasscutter.game.quest.*;
import emu.grasscutter.game.quest.QuestEncryptionKey;
import emu.grasscutter.game.quest.RewindData;
import emu.grasscutter.game.quest.TeleportData;
import emu.grasscutter.game.quest.enums.QuestCond;
import emu.grasscutter.game.world.GroupReplacementData;
import emu.grasscutter.utils.Utils;
import it.unimi.dsi.fastutil.ints.*;
import lombok.*;
import javax.annotation.Nullable;
import java.lang.reflect.Field;
import java.util.*;
import javax.annotation.Nullable;
import lombok.*;
@SuppressWarnings({"unused", "MismatchedQueryAndUpdateOfCollection"})
public final class GameData {
@ -258,6 +278,10 @@ public final class GameData {
private static final Int2ObjectMap<GuideTriggerData> guideTriggerDataMap =
new Int2ObjectOpenHashMap<>();
@Getter
private static final Int2ObjectMap<HomeWorldAnimalData> homeWorldAnimalDataMap =
new Int2ObjectOpenHashMap<>();
@Getter
private static final Int2ObjectMap<HomeWorldBgmData> homeWorldBgmDataMap =
new Int2ObjectOpenHashMap<>();

View File

@ -7,9 +7,8 @@ import emu.grasscutter.game.managers.blossom.BlossomConfig;
import emu.grasscutter.game.world.SpawnDataEntry;
import emu.grasscutter.utils.objects.WeightedList;
import it.unimi.dsi.fastutil.ints.*;
import lombok.*;
import java.util.*;
import lombok.*;
public class GameDepot {
public static final int[] BLOCK_SIZE = new int[] {50, 500}; // Scales

View File

@ -1,5 +1,8 @@
package emu.grasscutter.data;
import static emu.grasscutter.utils.FileUtils.*;
import static emu.grasscutter.utils.lang.Language.translate;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import emu.grasscutter.Grasscutter;
@ -20,9 +23,6 @@ import emu.grasscutter.scripts.*;
import emu.grasscutter.utils.*;
import it.unimi.dsi.fastutil.Pair;
import it.unimi.dsi.fastutil.ints.*;
import lombok.*;
import javax.script.*;
import java.io.*;
import java.nio.file.*;
import java.util.*;
@ -30,9 +30,8 @@ import java.util.Map.Entry;
import java.util.concurrent.*;
import java.util.regex.Pattern;
import java.util.stream.*;
import static emu.grasscutter.utils.FileUtils.*;
import static emu.grasscutter.utils.lang.Language.translate;
import javax.script.*;
import lombok.*;
public final class ResourceLoader {

View File

@ -3,7 +3,6 @@ package emu.grasscutter.data.binout;
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
import emu.grasscutter.game.ability.AbilityLocalIdGenerator;
import emu.grasscutter.game.ability.AbilityLocalIdGenerator.ConfigAbilitySubContainerType;
import java.util.*;
public class AbilityData {

View File

@ -3,7 +3,6 @@ package emu.grasscutter.data.binout;
import com.google.gson.*;
import com.google.gson.annotations.SerializedName;
import com.google.gson.reflect.TypeToken;
import java.io.Serializable;
import java.util.*;

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.binout;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.common.DynamicFloat;
import emu.grasscutter.game.props.ElementType;
import lombok.ToString;
import java.io.Serializable;
import lombok.ToString;
public class AbilityModifier implements Serializable {
private static final long serialVersionUID = -2001232313615923575L;

View File

@ -1,7 +1,6 @@
package emu.grasscutter.data.binout;
import emu.grasscutter.data.binout.AbilityModifier.AbilityModifierAction;
import java.util.*;
public class AbilityModifierEntry {

View File

@ -1,10 +1,9 @@
package emu.grasscutter.data.binout;
import javax.annotation.Nullable;
import lombok.*;
import lombok.experimental.FieldDefaults;
import javax.annotation.Nullable;
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class ConfigGadget {

View File

@ -2,11 +2,10 @@ package emu.grasscutter.data.binout;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.game.world.Position;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class HomeworldDefaultSaveData {

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.binout;
import dev.morphia.annotations.Entity;
import emu.grasscutter.data.GameData;
import emu.grasscutter.game.quest.enums.QuestType;
import lombok.Data;
import java.util.*;
import lombok.Data;
public class MainQuestData {
private int id;

View File

@ -1,7 +1,6 @@
package emu.grasscutter.data.binout;
import emu.grasscutter.data.ResourceLoader.OpenConfigData;
import java.util.*;
public class OpenConfigEntry {

View File

@ -3,11 +3,10 @@ package emu.grasscutter.data.binout;
import com.github.davidmoten.rtreemulti.RTree;
import com.github.davidmoten.rtreemulti.geometry.Geometry;
import emu.grasscutter.scripts.data.SceneGroup;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import lombok.*;
import lombok.experimental.FieldDefaults;
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)

View File

@ -2,11 +2,10 @@ package emu.grasscutter.data.binout;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.game.world.Position;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class SceneNpcBornEntry {

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.binout;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.util.*;
import lombok.Data;
@Data
public class ScriptSceneData {

View File

@ -2,7 +2,6 @@ package emu.grasscutter.data.binout;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.common.DynamicFloat;
import java.io.Serializable;
public class TalentData implements Serializable {

View File

@ -1,10 +1,9 @@
package emu.grasscutter.data.binout.config;
import emu.grasscutter.data.binout.config.fields.*;
import lombok.Data;
import javax.annotation.Nullable;
import java.util.Collection;
import javax.annotation.Nullable;
import lombok.Data;
@Data
public class ConfigEntityBase {

View File

@ -1,8 +1,7 @@
package emu.grasscutter.data.binout.config;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
public class ConfigGlobalCombat {

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.binout.config;
import emu.grasscutter.data.binout.config.fields.ConfigAbilityData;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
public class ConfigLevelEntity {

View File

@ -1,8 +1,7 @@
package emu.grasscutter.data.binout.config.fields;
import lombok.Data;
import java.util.*;
import lombok.Data;
/** Contains information about the entities SGVs */
@Data

View File

@ -1,10 +1,9 @@
package emu.grasscutter.data.binout.routes;
import javax.annotation.Nullable;
import lombok.*;
import lombok.experimental.FieldDefaults;
import javax.annotation.Nullable;
@Data
@FieldDefaults(level = AccessLevel.PRIVATE)
public class SceneRoutes {

View File

@ -4,9 +4,8 @@ import emu.grasscutter.data.excels.ProudSkillData;
import emu.grasscutter.game.ability.Ability;
import it.unimi.dsi.fastutil.floats.FloatArrayList;
import it.unimi.dsi.fastutil.objects.*;
import lombok.*;
import java.util.*;
import lombok.*;
@Getter
public class DynamicFloat {

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.custom;
import emu.grasscutter.data.common.BaseTrialActivityData;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
public class TrialAvatarActivityCustomData implements BaseTrialActivityData {

View File

@ -1,8 +1,7 @@
package emu.grasscutter.data.custom;
import lombok.Data;
import java.util.List;
import lombok.Data;
@Data
public class TrialAvatarCustomData {

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@Getter
@ResourceType(name = "BargainExcelConfigData.json")

View File

@ -3,10 +3,9 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.game.props.*;
import emu.grasscutter.net.proto.BattlePassMissionOuterClass.BattlePassMission.MissionStatus;
import lombok.Getter;
import java.util.*;
import java.util.stream.Collectors;
import lombok.Getter;
@ResourceType(name = {"BattlePassMissionExcelConfigData.json"})
@Getter

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@ResourceType(name = "BattlePassRewardExcelConfigData.json")
@Getter

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@ResourceType(name = "BlossomRefreshExcelConfigData.json")
@Getter

View File

@ -1,9 +1,8 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import lombok.Getter;
import java.util.*;
import lombok.Getter;
@Getter
@ResourceType(name = "ChapterExcelConfigData.json")

View File

@ -1,11 +1,10 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@ResourceType(name = "CityConfigData.json", loadPriority = ResourceType.LoadPriority.HIGH)
@Getter
@Setter

View File

@ -2,7 +2,6 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.ItemParamData;
import java.util.List;
import java.util.stream.Collectors;

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.excels;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.ItemParamData;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@ResourceType(
name = {"CompoundExcelConfigData.json"},

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.ItemParamData;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@ResourceType(
name = {"CookRecipeExcelConfigData.json"},

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.DropItemData;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@ResourceType(
name = {"DropTableExcelConfigData.json", "DropSubTableExcelConfigData.json"},

View File

@ -2,7 +2,6 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.ItemParamData;
import java.util.List;
@ResourceType(

View File

@ -2,7 +2,6 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.FightPropData;
import java.util.ArrayList;
@ResourceType(name = "EquipAffixExcelConfigData.json")

View File

@ -3,7 +3,6 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.OpenCondData;
import java.util.List;
@ResourceType(

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.ItemParamData;
import lombok.Getter;
import java.util.List;
import lombok.Getter;
@ResourceType(
name = {"ForgeExcelConfigData.json"},

View File

@ -2,11 +2,10 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.ItemParamData;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@Getter
@FieldDefaults(level = AccessLevel.PRIVATE)
@ResourceType(name = {"FurnitureMakeExcelConfigData.json"})

View File

@ -0,0 +1,22 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.GameResource;
import emu.grasscutter.data.ResourceType;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.experimental.FieldDefaults;
@ResourceType(name = "HomeworldAnimalExcelConfigData.json")
@FieldDefaults(level = AccessLevel.PRIVATE)
@Getter
public class HomeWorldAnimalData extends GameResource {
int furnitureID;
int monsterID;
int isRebirth;
int rebirthCD;
@Override
public int getId() {
return this.furnitureID;
}
}

View File

@ -9,11 +9,16 @@ import lombok.experimental.FieldDefaults;
@FieldDefaults(level = AccessLevel.PRIVATE)
@ResourceType(name = {"HomeWorldBgmExcelConfigData.json"})
public class HomeWorldBgmData extends GameResource {
@SerializedName(value = "homeBgmId", alternate = {"MJJENLEBKEF"})
@SerializedName(
value = "homeBgmId",
alternate = {"MJJENLEBKEF"})
private int homeBgmId;
@SerializedName(value = "isDefaultUnlock", alternate = {"GBEONILEOBA"})
@SerializedName(
value = "isDefaultUnlock",
alternate = {"GBEONILEOBA"})
private boolean isDefaultUnlock;
private boolean NBIDHGOOCKD;
private boolean JJMNJMCCOKP;
private int cityId;

View File

@ -1,11 +1,10 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@Getter
@FieldDefaults(level = AccessLevel.PRIVATE)
@ResourceType(name = {"HomeworldLevelExcelConfigData.json"})

View File

@ -3,27 +3,42 @@ package emu.grasscutter.data.excels;
import com.google.gson.annotations.SerializedName;
import emu.grasscutter.data.*;
import emu.grasscutter.game.inventory.ItemQuality;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@ResourceType(name = "HomeWorldNPCExcelConfigData.json")
@Getter
@FieldDefaults(level = AccessLevel.PRIVATE)
public class HomeWorldNPCData extends GameResource {
int furnitureID;
int avatarID;
@SerializedName(value = "npcId", alternate = {"HDLJMOGHICL"})
@SerializedName(
value = "npcId",
alternate = {"HDLJMOGHICL"})
int npcId;
@SerializedName(value = "talkIdList", alternate = {"CKMCLCNIBLD"})
@SerializedName(
value = "talkIdList",
alternate = {"CKMCLCNIBLD"})
List<Integer> talkIdList;
@SerializedName(value = "isTalkRandomly", alternate = {"HPJMMEBNMAI"})
@SerializedName(
value = "isTalkRandomly",
alternate = {"HPJMMEBNMAI"})
boolean isTalkRandomly;
@SerializedName(value = "npcQuality", alternate = {"BHJOIKFHIBD"})
@SerializedName(
value = "npcQuality",
alternate = {"BHJOIKFHIBD"})
ItemQuality npcQuality;
@SerializedName(value = "titleTextMapHash", alternate = {"GNMAIEGCFPO"})
@SerializedName(
value = "titleTextMapHash",
alternate = {"GNMAIEGCFPO"})
long titleTextMapHash;
long descTextMapHash;
@Override

View File

@ -1,11 +1,10 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@ResourceType(
name = "InvestigationMonsterConfigData.json",
loadPriority = ResourceType.LoadPriority.LOW)

View File

@ -8,9 +8,8 @@ import emu.grasscutter.game.inventory.*;
import emu.grasscutter.game.props.*;
import emu.grasscutter.game.props.ItemUseAction.ItemUseAction;
import it.unimi.dsi.fastutil.ints.*;
import lombok.Getter;
import java.util.*;
import lombok.Getter;
@ResourceType(
name = {

View File

@ -1,11 +1,10 @@
package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import java.util.List;
import lombok.*;
import lombok.experimental.FieldDefaults;
import java.util.List;
@ResourceType(name = "PersonalLineExcelConfigData.json")
@Getter
@Setter // TODO: remove setters next API break

View File

@ -4,9 +4,8 @@ import dev.morphia.annotations.Transient;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.*;
import it.unimi.dsi.fastutil.objects.*;
import lombok.Getter;
import java.util.*;
import lombok.Getter;
@ResourceType(name = "ProudSkillExcelConfigData.json")
public class ProudSkillData extends GameResource {

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.game.props.RefreshType;
import emu.grasscutter.game.world.World;
import lombok.Getter;
import java.util.*;
import lombok.Getter;
@ResourceType(name = "RefreshPolicyExcelConfigData.json")
public class RefreshPolicyExcelConfigData extends GameResource {

View File

@ -2,7 +2,6 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.common.ItemParamData;
import java.util.List;
@ResourceType(name = "RewardExcelConfigData.json")

View File

@ -3,9 +3,8 @@ package emu.grasscutter.data.excels;
import emu.grasscutter.data.*;
import emu.grasscutter.data.ResourceType.LoadPriority;
import emu.grasscutter.data.common.*;
import lombok.Getter;
import java.util.Arrays;
import lombok.Getter;
@ResourceType(name = "RewardPreviewExcelConfigData.json", loadPriority = LoadPriority.HIGH)
public class RewardPreviewData extends GameResource {

Some files were not shown because too many files have changed in this diff Show More