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 , LocatorBar = 17 , ShowDaysPlayed = 18 ,
  DoNaturalRegeneration = 19 , DoTntExplode = 20 , SendCommandFeedback = 21 , MaxCommandChainLength = 22 ,
  DoInsomnia = 23 , CommandBlocksEnabled = 24 , RandomTickSpeed = 25 , DoImmediateRespawn = 26 ,
  ShowDeathMessages = 27 , FunctionCommandLimit = 28 , PlayerSpawnRadius = 29 , ShowTags = 30 ,
  FreezeDamage = 31 , RespawnBlocksExplode = 32 , ShowBorderEffect = 33 , ShowRecipeMessages = 34 ,
  PlayerSleepingPercentage = 35 , ProjectilesCanBreakBlocks = 36 , TntExplosionDropDecay = 37 , VanillaGameRuleCount = 38 ,
  GlobalMute = 38 , AllowDestructiveObjects = 39 , AllowMobs = 40 , CodeBuilder = 41 ,
  EduCloudSave = 42 , EduGameRuleCount = 43 , GameRuleCount = 43
}
 
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 *pValueValidated, bool *pValueChanged, ::GameRule::ValidationError *errorOutput)
 
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 *pValueValidated, bool *pValueChanged, ::GameRule::ValidationError *errorOutput)
 
MCAPI void setTagData (::CompoundTag &tag) const
 
MCAPI void * $ctor ()
 
MCAPI void * $ctor (::GameRules const &rhs)
 
MCAPI void $dtor ()
 

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, 0 > > mGameRuleChangePublisher
 
::std::shared_ptr<::Bedrock::EnableNonOwnerReferences::ControlBlockmControlBlock
 

Member Function Documentation

◆ $vftable()

static MCAPI void ** GameRules::$vftable ( )
static
Attention
This function is not yet publicly available. To request access: reference this function in your code and attempt to link. The linker will report the exact symbol name. Submit a access request at https://github.com/LiteLDev/mcapi-requests/issues/new including the full symbol name.

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