Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
Village Class Reference

Classes

struct  DwellerData
struct  StandingModifiers

Public Types

enum class  VillageVersion : uchar { Base = 0 , WorksiteInitEventFix = 1 , Count = 2 }
using ClaimedPOIList = ::std::unordered_map<::ActorUniqueID, ::std::array<::std::weak_ptr<::POIInstance>, 3>>
using DwellerMap = ::std::unordered_map<::ActorUniqueID, ::Village::DwellerData>
using DwellerTimestamp = ::std::pair<::ActorUniqueID, ::Tick>
using UnclaimedPOIList = ::std::array<::std::vector<::std::weak_ptr<::POIInstance>>, 3>

Public Member Functions

Village & operator= (Village const &)
 Village (Village const &)
MCAPI Village (::Dimension &dimension, ::mce::UUID id, ::BlockPos const &origin)
MCAPI void _calcPOIDist ()
MCAPI void _clearVillagerPOIs (::ActorUniqueID const &villager)
MCAPI void _createRaid ()
MCAPI bool _findSpawnPointForRaid (::Vec3 &outSpawnPoint, float const distanceTolerance, float const boundsScaling, bool snapToSurface, bool outsideOfVillage) const
MCAPI::BlockSource * _findSpawnableRegion (::Vec3 spawnPosition, int xzSpreadDistance, bool &outHasSpawnAreaLoaded) const
MCAPI void _playSoundFrom (::Vec3 const &soundOrigin, ::SharedTypes::Legacy::LevelSoundEvent sound)
MCAPI void _saveVillageData (::LevelStorage &levelStorage) const
MCAPI void _saveVillageDwellers (::LevelStorage &levelStorage) const
MCAPI void _saveVillagePOIs (::LevelStorage &levelStorage) const
MCAPI void _saveVillagePlayerStanding (::LevelStorage &levelStorage) const
MCAPI void _saveVillageRaid (::LevelStorage &levelStorage) const
MCAPI void _tryAddPoiToVillage (::ActorUniqueID const &villager, ::std::weak_ptr<::POIInstance > pi)
MCAPI void addActorToVillage (::DwellerRole role, ::ActorUniqueID const &actorID)
MCAPI bool addPOI (::std::weak_ptr<::POIInstance > pi)
MCAPI void addVillager (::ActorUniqueID const &villagerID)
MCAPI bool checkNeedMoreVillagers () const
MCAPI ::std::weak_ptr<::POIInstance > fetchOwnedPOI (::ActorUniqueID const &id, ::POIType type)
MCAPI void fireSoundTheAlarm ()
MCAPI::Actor * getClosestAggressor (::Actor *from)
MCAPI::Player * getClosestBadStandingPlayer (::Actor &from)
MCAPI ::std::weak_ptr<::POIInstance > getClosestPOI (::POIType type, ::BlockPos const &position)
MCAPI bool hasInvalidRole (::ActorUniqueID const &actorId, ::DwellerRole const &role)
MCAPI bool hasSpecificDweller (::DwellerRole role, ::ActorUniqueID const &id) const
MCAPI int modifyStanding (::ActorUniqueID const &playerID, int delta)
MCAPI ::std::_List_iterator< ::std::_List_val<::std::_List_simple_types<::std::pair<::ActorUniqueID const, ::Village::DwellerData > > > > removeActorFromVillage (::DwellerRole role, ::ActorUniqueID const &actor)
MCAPI void removeAllInstancesofActorFromVillage (::ActorUniqueID const &actor)
MCAPI ::std::_List_iterator< ::std::_List_val<::std::_List_simple_types<::std::pair<::ActorUniqueID const, ::Village::DwellerData > > > > removeVillager (::ActorUniqueID const &villager)
MCAPI void resetDwellerTimer (::DwellerRole role, ::ActorUniqueID const &id)
MCAPI void setSavedDwellerPosition (::DwellerRole role, ::ActorUniqueID const &id, ::BlockPos pos)
MCAPI void tick (::Tick tick, ::BlockSource &region)
MCAPI void triggerRaid ()
MCAPI void trySetVillagerWorkTimestamp (::ActorUniqueID const &id)
MCAPI void unlinkMismatchedJobsites (::Actor const &villager)
MCAPI bool villagerLivesHere (::ActorUniqueID const &villager) const
MCAPI void * $ctor (::Dimension &dimension, ::mce::UUID id, ::BlockPos const &origin)

Static Public Member Functions

static MCAPI bool isVillagePOI (::VillageManager const &villageManager, ::Block const &block)
static MCAPI ::std::string const & CELEBRATION_EVENT ()
static MCAPI ::std::string const & RAID_EXPIRY_EVENT ()
static MCAPI ::std::string const & STORAGE_KEY_PREFIX ()

Public Attributes

::ll::TypedStorage< 8, 16, ::mce::UUID > mUniqueID
::ll::TypedStorage< 8, 8, ::Dimension & > mDimension
::ll::TypedStorage< 8, 72, ::std::array<::std::vector<::std::weak_ptr<::POIInstance > >, 3 > > mUnclaimedPOIStacks
::ll::TypedStorage< 8, 64, ::std::unordered_map<::ActorUniqueID, ::std::array<::std::weak_ptr<::POIInstance >, 3 > > > mClaimedPOIs
::ll::TypedStorage< 8, 256, ::std::array<::std::unordered_map<::ActorUniqueID, ::Village::DwellerData >, 4 > > mDwellers
::ll::TypedStorage< 4, 24, ::AABB > mBounds
::ll::TypedStorage< 4, 24, ::AABB > mStaticRaidBounds
::ll::TypedStorage< 1, 1, uchar > mVillageVersion
::ll::TypedStorage< 8, 8, ::Tick > mGameTick
::ll::TypedStorage< 8, 8, ::Tick > mSaveTick
::ll::TypedStorage< 8, 8, ::Tick > mRingTick
::ll::TypedStorage< 8, 8, ::Tick > mNoBreedTimer
::ll::TypedStorage< 8, 8, ::Tick > mBadStandingDecayTimer
::ll::TypedStorage< 8, 8, ::Tick > mGoodStandingDecayTimer
::ll::TypedStorage< 8, 8, ::Tick > mPassiveDwellerSpawnTimer
::ll::TypedStorage< 4, 4, int > mInitializationTimer
::ll::TypedStorage< 8, 64, ::std::unordered_map<::ActorUniqueID, int > > mPlayerStanding
::ll::TypedStorage< 8, 64, ::std::unordered_map<::ActorUniqueID, ::Village::DwellerData > > mAggressors
::ll::TypedStorage< 8, 24, ::std::vector<::std::pair<::ActorUniqueID, ::Tick > > > mVillagerWorkTimestamps
::ll::TypedStorage< 1, 1, bool > mVillageInitialized
::ll::TypedStorage< 8, 48, ::HashedString const > mNitwitFamily
::ll::TypedStorage< 8, 48, ::HashedString const > mVillagePrefix
::ll::TypedStorage< 8, 48, ::HashedString const > mVillagePrefixOld
::ll::TypedStorage< 8, 8, ::std::unique_ptr<::Raid > > mRaid
::ll::TypedStorage< 8, 64, ::std::unordered_set<::ActorUniqueID > > mSoundTheAlarmPlayerList

Member Function Documentation

◆ _calcPOIDist()

MCAPI void Village::_calcPOIDist ( )
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.

◆ _clearVillagerPOIs()

MCAPI void Village::_clearVillagerPOIs ( ::ActorUniqueID const & villager)
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.

◆ _createRaid()

MCAPI void Village::_createRaid ( )
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.

◆ _findSpawnPointForRaid()

MCAPI bool Village::_findSpawnPointForRaid ( ::Vec3 & outSpawnPoint,
float const distanceTolerance,
float const boundsScaling,
bool snapToSurface,
bool outsideOfVillage ) const
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.

◆ _findSpawnableRegion()

MCAPI::BlockSource * Village::_findSpawnableRegion ( ::Vec3 spawnPosition,
int xzSpreadDistance,
bool & outHasSpawnAreaLoaded ) const
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.

◆ _playSoundFrom()

MCAPI void Village::_playSoundFrom ( ::Vec3 const & soundOrigin,
::SharedTypes::Legacy::LevelSoundEvent sound )
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.

◆ _saveVillageData()

MCAPI void Village::_saveVillageData ( ::LevelStorage & levelStorage) const
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.

◆ _saveVillageDwellers()

MCAPI void Village::_saveVillageDwellers ( ::LevelStorage & levelStorage) const
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.

◆ _saveVillagePOIs()

MCAPI void Village::_saveVillagePOIs ( ::LevelStorage & levelStorage) const
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.

◆ _saveVillagePlayerStanding()

MCAPI void Village::_saveVillagePlayerStanding ( ::LevelStorage & levelStorage) const
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.

◆ _saveVillageRaid()

MCAPI void Village::_saveVillageRaid ( ::LevelStorage & levelStorage) const
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.

◆ _tryAddPoiToVillage()

MCAPI void Village::_tryAddPoiToVillage ( ::ActorUniqueID const & villager,
::std::weak_ptr<::POIInstance > pi )
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.

◆ addActorToVillage()

MCAPI void Village::addActorToVillage ( ::DwellerRole role,
::ActorUniqueID const & actorID )
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.

◆ addPOI()

MCAPI bool Village::addPOI ( ::std::weak_ptr<::POIInstance > pi)
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.

◆ addVillager()

MCAPI void Village::addVillager ( ::ActorUniqueID const & villagerID)
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.

◆ checkNeedMoreVillagers()

MCAPI bool Village::checkNeedMoreVillagers ( ) const
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.

◆ fetchOwnedPOI()

MCAPI ::std::weak_ptr<::POIInstance > Village::fetchOwnedPOI ( ::ActorUniqueID const & id,
::POIType type )
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.

◆ fireSoundTheAlarm()

MCAPI void Village::fireSoundTheAlarm ( )
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.

◆ getClosestAggressor()

MCAPI::Actor * Village::getClosestAggressor ( ::Actor * from)
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.

◆ getClosestBadStandingPlayer()

MCAPI::Player * Village::getClosestBadStandingPlayer ( ::Actor & from)
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.

◆ getClosestPOI()

MCAPI ::std::weak_ptr<::POIInstance > Village::getClosestPOI ( ::POIType type,
::BlockPos const & position )
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.

◆ hasInvalidRole()

MCAPI bool Village::hasInvalidRole ( ::ActorUniqueID const & actorId,
::DwellerRole const & role )
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.

◆ hasSpecificDweller()

MCAPI bool Village::hasSpecificDweller ( ::DwellerRole role,
::ActorUniqueID const & id ) const
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.

◆ modifyStanding()

MCAPI int Village::modifyStanding ( ::ActorUniqueID const & playerID,
int delta )
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.

◆ removeActorFromVillage()

MCAPI ::std::_List_iterator< ::std::_List_val<::std::_List_simple_types<::std::pair<::ActorUniqueID const, ::Village::DwellerData > > > > Village::removeActorFromVillage ( ::DwellerRole role,
::ActorUniqueID const & actor )
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.

◆ removeAllInstancesofActorFromVillage()

MCAPI void Village::removeAllInstancesofActorFromVillage ( ::ActorUniqueID const & actor)
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.

◆ removeVillager()

MCAPI ::std::_List_iterator< ::std::_List_val<::std::_List_simple_types<::std::pair<::ActorUniqueID const, ::Village::DwellerData > > > > Village::removeVillager ( ::ActorUniqueID const & villager)
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.

◆ resetDwellerTimer()

MCAPI void Village::resetDwellerTimer ( ::DwellerRole role,
::ActorUniqueID const & id )
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.

◆ setSavedDwellerPosition()

MCAPI void Village::setSavedDwellerPosition ( ::DwellerRole role,
::ActorUniqueID const & id,
::BlockPos pos )
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.

◆ triggerRaid()

MCAPI void Village::triggerRaid ( )
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.

◆ trySetVillagerWorkTimestamp()

MCAPI void Village::trySetVillagerWorkTimestamp ( ::ActorUniqueID const & id)
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.

◆ unlinkMismatchedJobsites()

MCAPI void Village::unlinkMismatchedJobsites ( ::Actor const & villager)
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.

◆ villagerLivesHere()

MCAPI bool Village::villagerLivesHere ( ::ActorUniqueID const & villager) const
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.

◆ isVillagePOI()

MCAPI bool Village::isVillagePOI ( ::VillageManager const & villageManager,
::Block const & block )
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.

◆ CELEBRATION_EVENT()

MCAPI ::std::string const & Village::CELEBRATION_EVENT ( )
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.

◆ RAID_EXPIRY_EVENT()

MCAPI ::std::string const & Village::RAID_EXPIRY_EVENT ( )
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.

◆ STORAGE_KEY_PREFIX()

MCAPI ::std::string const & Village::STORAGE_KEY_PREFIX ( )
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: