LeviLamina
Loading...
Searching...
No Matches
GameRules Class Reference
+ Inheritance diagram for GameRules:

Public Types

enum class  GameRulesIndex : int {
  InvalidGameRule = -1 , CommandBlockOutput = 0 , DoDaylightCycle = 1 , DoEntityDrops = 2 ,
  DoFireTick = 3 , RecipesUnlock = 4 , DoLimitedCrafting = 5 , DoMobLoot = 6 ,
  DoMobSpawning = 7 , DoTileDrops = 8 , DoWeatherCycle = 9 , DrowningDamage = 10 ,
  FallDamage = 11 , FireDamage = 12 , KeepInventory = 13 , MobGriefing = 14 ,
  Pvp = 15 , ShowCoordinates = 16 , ShowDaysPlayed = 17 , DoNaturalRegeneration = 18 ,
  DoTntExplode = 19 , SendCommandFeedback = 20 , MaxCommandChainLength = 21 , DoInsomnia = 22 ,
  CommandBlocksEnabled = 23 , RandomTickSpeed = 24 , DoImmediateRespawn = 25 , ShowDeathMessages = 26 ,
  FunctionCommandLimit = 27 , PlayerSpawnRadius = 28 , ShowTags = 29 , FreezeDamage = 30 ,
  RespawnBlocksExplode = 31 , ShowBorderEffect = 32 , ShowRecipeMessages = 33 , PlayerSleepingPercentage = 34 ,
  ProjectilesCanBreakBlocks = 35 , TntExplosionDropDecay = 36 , VanillaGameRuleCount = 37 , GlobalMute = 37 ,
  AllowDestructiveObjects = 38 , AllowMobs = 39 , CodeBuilder = 40 , EduCloudSave = 41 ,
  EduGameRuleCount = 42 , GameRuleCount = 42
}
 
using GameRuleMap = ::std::vector<::GameRule>
 
using WorldPolicyMap = ::std::map<::HashedString, ::GameRule>
 

Public Member Functions

MCAPI GameRules (::GameRules const &rhs)
 
MCAPI::GameRule & _registerRule (::std::string const &name, ::GameRuleId rule)
 
MCAPI void _registerRules ()
 
MCAPI ::std::unique_ptr<::GameRulesChangedPacket_setGameRule (::GameRule *gameRule, ::GameRule::Value value, ::GameRule::Type type, bool returnPacket, bool *errorOutput, bool *pValueValidated, ::GameRule::ValidationError *pValueChanged)
 
MCAPI ::std::unique_ptr<::GameRulesChangedPacketcreateAllGameRulesPacket () const
 
MCAPI void deserializeRules (::GameRulesChangedPacketData const &ruleData)
 
MCAPI bool getBool (::GameRuleId ruleType, bool defaultValue) const
 
MCAPI int getInt (::GameRuleId ruleType) const
 
MCAPI void getTagData (::CompoundTag const &tag, ::BaseGameVersion const &version)
 
MCAPI::GameRuleId nameToGameRuleIndex (::std::string const &name) const
 
MCAPI::GameRules & operator= (::GameRules const &rhs)
 
MCAPI void setMarketplaceOverrides ()
 
MCAPI ::std::unique_ptr<::GameRulesChangedPacketsetRule (::GameRuleId rule, bool value, bool returnPacket, bool *errorOutput, bool *pValueValidated, ::GameRule::ValidationError *pValueChanged)
 
MCAPI void setTagData (::CompoundTag &tag) const
 
MCAPI void * $ctor ()
 
MCAPI void * $ctor (::GameRules const &rhs)
 
MCAPI void $dtor ()
 
MCFOLD void * $ctor (::Bedrock::EnableNonOwnerReferences const &)
 

Static Public Member Functions

static MCAPI ::std::map<::GameRuleId, ::GameRule > const & _getMarketplaceGameRulesDefaultMap ()
 
static MCAPI int const & MAX_FUNCTIONCOMMANDLIMIT ()
 
static MCAPI ::std::string const & WORLD_POLICY_TAG_NAME ()
 
static MCAPI void ** $vftable ()
 

Public Attributes

::ll::TypedStorage< 8, 24, ::std::vector<::GameRule > > mGameRules
 
::ll::TypedStorage< 8, 16, ::std::map<::HashedString, ::GameRule > > mWorldPolicies
 
::ll::TypedStorage< 8, 128, ::Bedrock::PubSub::Publisher< void(::GameRules const &, ::GameRuleId const &), ::Bedrock::PubSub::ThreadModel::MultiThreaded > > mGameRuleChangePublisher
 
::std::shared_ptr<::Bedrock::EnableNonOwnerReferences::ControlBlockmControlBlock
 

The documentation for this class was generated from the following file: