26 enum class GameRulesIndex :
int {
28 CommandBlockOutput = 0,
33 DoLimitedCrafting = 5,
46 LocatorBarDeprecated = 18,
48 DoNaturalRegeneration = 20,
50 SendCommandFeedback = 22,
51 MaxCommandChainLength = 23,
53 CommandBlocksEnabled = 25,
55 DoImmediateRespawn = 27,
56 ShowDeathMessages = 28,
57 FunctionCommandLimit = 29,
58 PlayerSpawnRadius = 30,
61 RespawnBlocksExplode = 33,
62 ShowBorderEffect = 34,
63 ShowRecipeMessages = 35,
64 PlayerSleepingPercentage = 36,
65 ProjectilesCanBreakBlocks = 37,
66 TntExplosionDropDecay = 38,
67 VanillaGameRuleCount = 39,
69 AllowDestructiveObjects = 40,
73 EduGameRuleCount = 44,
77 using GameRuleMap = ::std::vector<::GameRule>;
79 using WorldPolicyMap = ::std::map<::HashedString, ::GameRule>;
84 ::ll::TypedStorage<8, 24, ::std::vector<::GameRule>> mGameRules;
85 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::GameRule>> mWorldPolicies;
91 mGameRuleChangePublisher;
109 MCAPI
void _registerRules();
113 ::std::variant<::cereal::NullType, bool, int, float> value,
114 ::GameRule::Type type,
116 bool* pValueValidated,
121 MCAPI ::std::unique_ptr<::GameRulesChangedPacket> createAllGameRulesPacket()
const;
125 MCAPI
bool getBool(
::GameRuleId ruleType,
bool defaultValue)
const;
136 MCNAPI
bool operator==(
::GameRules const& rhs)
const;
MCAPI ::std::unique_ptr<::GameRulesChangedPacket > _setGameRule(::GameRule *gameRule, ::std::variant<::cereal::NullType, bool, int, float > value, ::GameRule::Type type, bool returnPacket, bool *pValueValidated, bool *pValueChanged, ::GameRule::ValidationError *errorOutput)