25 using GameRuleMap = ::std::vector<::GameRule>;
27 using WorldPolicyMap = ::std::map<::HashedString, ::GameRule>;
29 enum class GameRulesIndex :
int {
31 CommandBlockOutput = 0,
36 DoLimitedCrafting = 5,
50 DoNaturalRegeneration = 19,
52 SendCommandFeedback = 21,
53 MaxCommandChainLength = 22,
55 CommandBlocksEnabled = 24,
57 DoImmediateRespawn = 26,
58 ShowDeathMessages = 27,
59 FunctionCommandLimit = 28,
60 PlayerSpawnRadius = 29,
63 RespawnBlocksExplode = 32,
64 ShowBorderEffect = 33,
65 ShowRecipeMessages = 34,
66 PlayerSleepingPercentage = 35,
67 ProjectilesCanBreakBlocks = 36,
68 TntExplosionDropDecay = 37,
69 VanillaGameRuleCount = 38,
71 AllowDestructiveObjects = 39,
75 EduGameRuleCount = 43,
82 ::ll::TypedStorage<8, 24, ::std::vector<::GameRule>> mGameRules;
83 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::GameRule>> mWorldPolicies;
89 mGameRuleChangePublisher;
106 MCAPI ::GameRule& _registerRule(::std::string
const& name,
::GameRuleId rule);
108 MCAPI
void _registerRules();
110 MCAPI ::std::unique_ptr<::GameRulesChangedPacket> _setGameRule(
113 ::GameRule::Type type,
115 bool* pValueValidated,
120 MCAPI ::std::unique_ptr<::GameRulesChangedPacket> createAllGameRulesPacket()
const;
124 MCAPI
bool getBool(
::GameRuleId ruleType,
bool defaultValue)
const;
130 MCAPI ::GameRuleId nameToGameRuleIndex(::std::string
const& name)
const;
132 MCAPI ::GameRules& operator=(
::GameRules const& rhs);
134 MCAPI
void setMarketplaceOverrides();
136 MCAPI ::std::unique_ptr<::GameRulesChangedPacket> setRule(
140 bool* pValueValidated,
151 MCAPI static ::std::map<::GameRuleId, ::GameRule>
const& _getMarketplaceGameRulesDefaultMap();
157 MCAPI
static int const& MAX_FUNCTIONCOMMANDLIMIT();
159 MCAPI static ::std::string
const& WORLD_POLICY_TAG_NAME();