Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
SurvivalMode Class Reference
Inheritance diagram for SurvivalMode:

Public Types

enum class  BuildActionMode : int { None = 0 , Interacting = 1 , AlignedPlacement = 2 }

Public Member Functions

virtual bool attack (::Actor &entity, ::Vec3 const &hitPosition)
virtual bool interact (::Actor &entity, ::Vec3 const &location, ::HandSlot const handSlot)
virtual bool destroyBlock (::BlockPos const &pos, uchar face)
virtual bool startDestroyBlock (::BlockPos const &pos, uchar face, bool &hasDestroyedBlock)
virtual void startBuildBlock (::BlockPos const &pos, uchar face, ::HandSlot const handSlot)
virtual bool buildBlock (::BlockPos const &pos, uchar face, ::HandSlot const handSlot, bool const isSimTick)
virtual bool useItem (::ItemStack &item, ::HandSlot const handSlot)
virtual bool useItemAsAttack (::ItemStack &item, ::Vec3 const &aimDirection, ::HandSlot const handSlot)
virtual::InteractionResult useItemOn (::ItemStack &item, ::BlockPos const &at, uchar face, ::Vec3 const &hit, ::HandSlot const handSlot, ::Block const *targetBlock, bool isFirstEvent)
virtual void tick ()
virtual void setTrialMode (bool isEnabled)
virtual bool isInTrialMode ()
virtual void registerUpsellScreenCallback (::std::function< void(bool)> callback)
MCAPI SurvivalMode (::Player &player)
MCAPI void _messagePlayers (::std::string message)
MCAPI void _showTrialReminder (bool force)
MCAPI void * $ctor (::Player &player)
MCAPI bool $attack (::Actor &entity, ::Vec3 const &hitPosition)
MCAPI bool $interact (::Actor &entity, ::Vec3 const &location, ::HandSlot const handSlot)
MCAPI bool $destroyBlock (::BlockPos const &pos, uchar face)
MCAPI bool $startDestroyBlock (::BlockPos const &pos, uchar face, bool &hasDestroyedBlock)
MCAPI void $startBuildBlock (::BlockPos const &pos, uchar face, ::HandSlot const handSlot)
MCAPI bool $buildBlock (::BlockPos const &pos, uchar face, ::HandSlot const handSlot, bool const isSimTick)
MCAPI bool $useItem (::ItemStack &item, ::HandSlot const handSlot)
MCAPI bool $useItemAsAttack (::ItemStack &item, ::Vec3 const &aimDirection, ::HandSlot const handSlot)
MCAPI::InteractionResult $useItemOn (::ItemStack &item, ::BlockPos const &at, uchar face, ::Vec3 const &hit, ::HandSlot const handSlot, ::Block const *targetBlock, bool isFirstEvent)
MCAPI void $tick ()
MCAPI void $setTrialMode (bool isEnabled)
MCAPI bool $isInTrialMode ()
MCAPI void $registerUpsellScreenCallback (::std::function< void(bool)> callback)
::BlockPos const & getDestroyBlockPos () const
::FacingID getDestroyBlockFace () const
virtual bool continueDestroyBlock (::BlockPos const &pos, uchar face, ::Vec3 const &playerPos, bool &hasDestroyedBlock)
virtual void stopDestroyBlock (::BlockPos const &pos)
virtual void continueBuildBlock (::BlockPos const &pos, uchar face, ::HandSlot handSlot, float buildDelayScale)
virtual void stopBuildBlock ()
virtual float getPickRange (::InputMode const &currentInputMode)
virtual void releaseUsingItem ()
MCAPI bool _attack (::Actor &entity, bool playPredictiveSound, ::Vec3 const &hitPosition)
MCAPI bool _creativeDestroyBlock (::BlockPos const &pos, uchar face)
MCAPI bool _enableBlockBreakDelay () const
MCAPI bool baseUseItem (::ItemStack const &item, ::HandSlot handSlot)
MCAPI bool baseUseItemAsAttack (::ItemStack const &item, ::Vec3 const &aimDirection, ::HandSlot handSlot)
MCAPI void continueBuildBlockAction (::Player const &player, ::HitResult const &hr, ::HandSlot handSlot, float buildDelayScale)
MCAPI float getDestroyRate (::Block const &block)
MCAPI float getMaxPickRange ()
MCAPI void * $ctor (::Player &player, ::std::unique_ptr<::IGameModeTimer > timer, ::std::unique_ptr<::IGameModeMessenger > messenger)
MCAPI void $dtor ()
MCAPI bool $continueDestroyBlock (::BlockPos const &pos, uchar face, ::Vec3 const &playerPos, bool &hasDestroyedBlock)
MCAPI void $stopDestroyBlock (::BlockPos const &pos)
MCAPI void $continueBuildBlock (::BlockPos const &pos, uchar face, ::HandSlot handSlot, float buildDelayScale)
MCAPI void $stopBuildBlock ()
MCAPI float $getPickRange (::InputMode const &currentInputMode)
MCAPI void $releaseUsingItem ()

Static Public Member Functions

static MCAPI bool & mTrialHasEnded ()
static MCAPI void ** $vftable ()
static MCAPI void _sendPlayerInteractWithBlockAfterEvent (::ItemStack const &beforeItem, ::ItemStack const &afterItem, ::Player &player, ::BlockPos const &at, uchar face, ::Vec3 const &hit, bool isFirstEvent)

Public Attributes

::ll::TypedStorage< 1, 1, bool > mIsTrialMode
::ll::TypedStorage< 1, 1, bool > mHasDisplayedIntro
::ll::TypedStorage< 4, 4, int > mTrialEndedReminder
::ll::TypedStorage< 8, 64, ::std::function< void(bool)> > mShowUpsellScreenCallback
::ll::TypedStorage< 8, 8, ::Player & > mPlayer
::ll::TypedStorage< 4, 12, ::BlockPos > mDestroyBlockPos
::ll::TypedStorage< 1, 1, uchar > mDestroyBlockFace
::ll::TypedStorage< 4, 4, float > mOldDestroyProgress
::ll::TypedStorage< 4, 4, float > mDestroyProgress
::ll::TypedStorage< 8, 8, double > mLastDestroyTime
::ll::TypedStorage< 4, 4, float > mDistanceTravelled
::ll::TypedStorage< 4, 12, ::Vec3 > mPlayerLastPosition
::ll::TypedStorage< 4, 64, ::GameMode::BuildContext > mBuildContext
::ll::TypedStorage< 4, 4, float > mMinPlayerSpeed
::ll::TypedStorage< 4, 4, int > mContinueBreakBlockCount
::ll::TypedStorage< 8, 8, ::std::chrono::steady_clock::time_point > mLastBuildTime
::ll::TypedStorage< 8, 8, ::std::chrono::steady_clock::time_point > mNoDestroyUntil
::ll::TypedStorage< 8, 8, ::std::chrono::steady_clock::time_point > mNoDestroySoundUntil
::ll::TypedStorage< 8, 8, ::std::chrono::milliseconds > creativeDestructionTickDelay
::ll::TypedStorage< 8, 8, ::std::chrono::milliseconds > buildingTickDelay
::ll::TypedStorage< 8, 8, ::std::chrono::milliseconds > destroySoundDelay
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::IGameModeTimer > > mTimer
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::IGameModeMessenger > > mMessenger

Constructor & Destructor Documentation

◆ SurvivalMode()

MCAPI SurvivalMode::SurvivalMode ( ::Player & player)
explicit
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.

Member Function Documentation

◆ attack()

virtual bool SurvivalMode::attack ( ::Actor & entity,
::Vec3 const & hitPosition )
virtual

Reimplemented from GameMode.

◆ interact()

virtual bool SurvivalMode::interact ( ::Actor & entity,
::Vec3 const & location,
::HandSlot const handSlot )
virtual

Reimplemented from GameMode.

◆ destroyBlock()

virtual bool SurvivalMode::destroyBlock ( ::BlockPos const & pos,
uchar face )
virtual

Reimplemented from GameMode.

◆ startDestroyBlock()

virtual bool SurvivalMode::startDestroyBlock ( ::BlockPos const & pos,
uchar face,
bool & hasDestroyedBlock )
virtual

Reimplemented from GameMode.

◆ startBuildBlock()

virtual void SurvivalMode::startBuildBlock ( ::BlockPos const & pos,
uchar face,
::HandSlot const handSlot )
virtual

Reimplemented from GameMode.

◆ buildBlock()

virtual bool SurvivalMode::buildBlock ( ::BlockPos const & pos,
uchar face,
::HandSlot const handSlot,
bool const isSimTick )
virtual

Reimplemented from GameMode.

◆ useItem()

virtual bool SurvivalMode::useItem ( ::ItemStack & item,
::HandSlot const handSlot )
virtual

Reimplemented from GameMode.

◆ useItemAsAttack()

virtual bool SurvivalMode::useItemAsAttack ( ::ItemStack & item,
::Vec3 const & aimDirection,
::HandSlot const handSlot )
virtual

Reimplemented from GameMode.

◆ tick()

virtual void SurvivalMode::tick ( )
virtual

Reimplemented from GameMode.

◆ setTrialMode()

virtual void SurvivalMode::setTrialMode ( bool isEnabled)
virtual

Reimplemented from GameMode.

◆ isInTrialMode()

virtual bool SurvivalMode::isInTrialMode ( )
virtual

Reimplemented from GameMode.

◆ registerUpsellScreenCallback()

virtual void SurvivalMode::registerUpsellScreenCallback ( ::std::function< void(bool)> callback)
virtual

Reimplemented from GameMode.

◆ _messagePlayers()

MCAPI void SurvivalMode::_messagePlayers ( ::std::string message)
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.

◆ _showTrialReminder()

MCAPI void SurvivalMode::_showTrialReminder ( bool force)
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.

◆ mTrialHasEnded()

MCAPI bool & SurvivalMode::mTrialHasEnded ( )
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.

◆ $ctor() [1/2]

MCAPI void * SurvivalMode::$ctor ( ::Player & player)
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.

◆ $tick()

MCAPI void SurvivalMode::$tick ( )
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.

◆ $setTrialMode()

MCAPI void SurvivalMode::$setTrialMode ( bool isEnabled)
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.

◆ $isInTrialMode()

MCAPI bool SurvivalMode::$isInTrialMode ( )
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.

◆ $registerUpsellScreenCallback()

MCAPI void SurvivalMode::$registerUpsellScreenCallback ( ::std::function< void(bool)> callback)
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.

◆ $vftable()

MCAPI void ** SurvivalMode::$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.

◆ _attack()

MCAPI bool GameMode::_attack ( ::Actor & entity,
bool playPredictiveSound,
::Vec3 const & hitPosition )
inherited
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.

◆ baseUseItemAsAttack()

MCAPI bool GameMode::baseUseItemAsAttack ( ::ItemStack const & item,
::Vec3 const & aimDirection,
::HandSlot handSlot )
inherited
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.

◆ continueBuildBlockAction()

MCAPI void GameMode::continueBuildBlockAction ( ::Player const & player,
::HitResult const & hr,
::HandSlot handSlot,
float buildDelayScale )
inherited
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.

◆ getDestroyRate()

MCAPI float GameMode::getDestroyRate ( ::Block const & block)
inherited
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.

◆ _sendPlayerInteractWithBlockAfterEvent()

MCAPI void GameMode::_sendPlayerInteractWithBlockAfterEvent ( ::ItemStack const & beforeItem,
::ItemStack const & afterItem,
::Player & player,
::BlockPos const & at,
uchar face,
::Vec3 const & hit,
bool isFirstEvent )
staticinherited
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.

◆ $ctor() [2/2]

MCAPI void * GameMode::$ctor ( ::Player & player,
::std::unique_ptr<::IGameModeTimer > timer,
::std::unique_ptr<::IGameModeMessenger > messenger )
inherited
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.

◆ $dtor()

MCAPI void GameMode::$dtor ( )
inherited
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.

◆ $getPickRange()

MCAPI float GameMode::$getPickRange ( ::InputMode const & currentInputMode)
inherited
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: