refactor: move GAME_RULE_SAVENAME to ConsoleGameRulesConstants.h

This commit is contained in:
MatthewBeshay 2026-04-09 22:03:05 +10:00
parent 9b729ed19e
commit a1b9329ad8
6 changed files with 9 additions and 6 deletions

View file

@ -27,8 +27,6 @@ class DLCGameRulesHeader;
class File;
class LevelRuleset;
#define GAME_RULE_SAVENAME "requiredGameRules.grf"
// 4J-JEV:
#define LEVEL_GEN_ID int
#define LEVEL_GEN_ID_NULL 0

View file

@ -14,7 +14,6 @@
#include "app/common/DLC/DLCPack.h"
#include "app/common/DLC/DLCTextureFile.h"
#include "app/common/DLC/DLCUIDataFile.h"
#include "app/common/GameRules/GameRuleManager.h"
#include "app/common/UI/All Platforms/ArchiveFile.h"
#include "app/linux/Linux_UIController.h"
#include "java/File.h"

View file

@ -14,7 +14,6 @@
#include "DispenserBootstrap.h"
#include "PlayerList.h"
#include "Settings.h"
#include "app/common/GameRules/GameRuleManager.h"
#include "java/Class.h"
#include "java/File.h"
#include "java/InputOutputStream/DataOutputStream.h"
@ -25,6 +24,7 @@
#include "minecraft/IGameServices.h"
#include "minecraft/Pos.h"
#include "minecraft/client/Options.h"
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
#include "minecraft/commands/Command.h"
#include "minecraft/network/INetworkService.h"
#include "minecraft/network/packet/GameEventPacket.h"

View file

@ -2,6 +2,12 @@
#include "java/InputOutputStream/DataOutputStream.h"
// Filename for the per-save game rules blob written by GameRuleManager
// and consumed by the save / converter / level storage paths. Defined
// here in minecraft/ so save-path consumers don't need to drag in the
// full app-side GameRuleManager header just for this string.
inline constexpr const char* GAME_RULE_SAVENAME = "requiredGameRules.grf";
class ConsoleGameRules {
public:
enum EGameRuleType {

View file

@ -8,11 +8,11 @@
#include <string>
#include <vector>
#include "app/common/GameRules/GameRuleManager.h"
#include "java/InputOutputStream/BufferedOutputStream.h"
#include "java/InputOutputStream/DataInputStream.h"
#include "java/InputOutputStream/DataOutputStream.h"
#include "minecraft/util/ProgressListener.h"
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
#include "minecraft/world/level/chunk/ChunkSource.h"
#include "minecraft/world/level/chunk/storage/RegionFile.h"
#include "minecraft/world/level/chunk/storage/RegionFileCache.h"

View file

@ -11,7 +11,6 @@
#include <utility>
#include "LevelData.h"
#include "app/common/GameRules/GameRuleManager.h"
#include "java/File.h"
#include "java/InputOutputStream/ByteArrayInputStream.h"
#include "java/InputOutputStream/ByteArrayOutputStream.h"
@ -23,6 +22,7 @@
#include "minecraft/IGameServices.h"
#include "minecraft/util/Log.h"
#include "minecraft/world/entity/player/Player.h"
#include "minecraft/world/level/ConsoleGameRulesConstants.h"
#include "minecraft/world/level/chunk/storage/OldChunkStorage.h"
#include "minecraft/world/level/dimension/Dimension.h"
#include "minecraft/world/level/dimension/HellDimension.h"