LeviLamina
Loading...
Searching...
No Matches
GameRule Class Reference

Classes

class  ValidationError

Public Types

enum class  Type : uchar { Invalid = 0 , Bool = 1 , Int = 2 , Float = 3 }
using TagDataNotFoundCallback = ::std::function<void(::GameRule&, ::BaseGameVersion const&)>
using ValidateValueCallback
using Value = ::std::variant<::cereal::NullType, bool, int, float>

Public Member Functions

MCAPI GameRule (::GameRule const &)
MCAPI GameRule (::std::string const &name, bool canBeModifiedByPlayer)
MCAPI bool _set (::std::variant<::cereal::NullType, bool, int, float > const &v, bool *pValidated, ::GameRule::ValidationError *errorOutput)
MCFOLD bool allowUseInCommand () const
MCFOLD bool allowUseInScripting () const
MCFOLD bool canBeModifiedByPlayer () const
MCAPI bool getBool () const
MCAPI float getFloat () const
MCAPI int getInt () const
MCAPI::std::string getLowercaseName () const
MCFOLD::std::string const & getName () const
MCFOLD::GameRule::Type getType () const
MCFOLD ::std::variant<::cereal::NullType, bool, int, float > const & getValue () const
MCAPI::GameRule & operator= (::GameRule &&)
MCAPI::GameRule & operator= (::GameRule const &)
MCAPI bool operator== (::GameRule const &other) const
MCFOLD bool requiresCheats () const
MCAPI void resetType (::GameRule::Type type)
MCAPI bool setBool (bool value, bool *pValidated, ::GameRule::ValidationError *errorOutput)
MCFOLD void setCanBeModifiedByPlayer (bool value)
MCAPI bool setFloat (float value, bool *pValidated, ::GameRule::ValidationError *errorOutput)
MCAPI bool setInt (int value, bool *pValidated, ::GameRule::ValidationError *errorOutput)
MCAPI::GameRule & setName (::std::string const &name)
MCAPI void * $ctor ()
MCAPI void * $ctor (::GameRule const &)
MCAPI void * $ctor (::std::string const &name, bool canBeModifiedByPlayer)
MCAPI void $dtor ()

Public Attributes

::ll::TypedStorage< 1, 1, bool > mShouldSave
::ll::TypedStorage< 1, 1, ::GameRule::Type > mType
::ll::TypedStorage< 4, 8, ::std::variant<::cereal::NullType, bool, int, float > > mValue
::ll::TypedStorage< 8, 32, ::std::string > mName
::ll::TypedStorage< 1, 1, bool > mAllowUseInCommand
::ll::TypedStorage< 1, 1, bool > mAllowUseInScripting
::ll::TypedStorage< 1, 1, bool > mIsDefaultSet
::ll::TypedStorage< 1, 1, bool > mRequiresCheats
::ll::TypedStorage< 1, 1, bool > mCanBeModifiedByPlayer
::ll::TypedStorage< 8, 64, ::std::function< void(::GameRule &, ::BaseGameVersion const &)> > mTagNotFoundCallback
::ll::TypedStorage< 8, 64, ::std::function< bool(::std::variant<::cereal::NullType, bool, int, float > const &, ::GameRule::ValidationError *)> > mValidateValueCallback

Member Typedef Documentation

◆ ValidateValueCallback

using GameRule::ValidateValueCallback
Initial value:
::std::function<
bool(::std::variant<::cereal::NullType, bool, int, float> const&, ::GameRule::ValidationError*)>
Definition GameRule.h:28

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