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

Villageoperator= (Village const &)
 Village (Village const &)
MCAPI Village (::Dimension &dimension, ::mce::UUID id, ::BlockPos const &origin)
MCAPI void _applyHeroOfTheVillageEffect (::ActorUniqueID const &actorID)
MCAPI void _calcPOIDist ()
MCAPI bool _chooseRaidSpawnPosition (uint64 timesCalled, ::Vec3 &outSpawnPoint) const
MCAPI::Vec3 _chooseRandomDirectionFromVillage (::Random &random) const
MCAPI void _claimUnclaimedPOIs ()
MCAPI void _clearVillagerPOIs (::ActorUniqueID const &villager)
MCAPI void _createRaid ()
MCAPI bool _findAvailablePOI (uint64 index, ::Level &level, ::Random &random, ::ActorUniqueID id)
MCAPI bool _findPlayerCentricSpawnPointForRaid (::Vec3 &outSpawnPoint, bool snapToSurface) const
MCAPI bool _findSpawnPointForRaid (::Vec3 &outSpawnPoint, float distanceTolerance, float boundsScaling, bool snapToSurface, bool outsideOfVillage) const
MCAPI::BlockSource * _findSpawnableRegion (::Vec3 spawnPosition, int xzSpreadDistance, bool &outHasSpawnAreaLoaded) const
MCAPI void _findWeightedPOI (::std::vector<::std::weak_ptr<::POIInstance > > &unclaimedPOIStack, ::Random &random, ::ActorUniqueID id)
MCAPI void _helpLocateRaiders (::Raid const &raid)
MCAPI void _loadVillageData (::CompoundTag const &tag)
MCAPI void _loadVillageDwellers (::CompoundTag const &tag)
MCAPI void _loadVillagePOIs (::CompoundTag const &tag)
MCAPI void _loadVillagePlayerStanding (::CompoundTag const &tag)
MCAPI void _playSoundFrom (::Vec3 const &soundOrigin, ::SharedTypes::Legacy::LevelSoundEvent sound)
MCAPI void _readyRaidGroup (::std::unordered_set<::ActorUniqueID > &spawnedMobs)
MCAPI void _ringBells (::BlockSource &region, ::Random &random) const
MCAPI void _saveVillageData (::LevelStorage &levelStorage) const
MCAPI void _saveVillageDwellers (::LevelStorage &levelStorage) const
MCAPI void _saveVillagePOIs (::LevelStorage &levelStorage) const
MCAPI void _saveVillagePOIsToTag (::CompoundTag &tag) const
MCAPI void _saveVillagePlayerStanding (::LevelStorage &levelStorage) const
MCAPI void _saveVillageRaid (::LevelStorage &levelStorage) const
MCAPI void _spawnPassiveDwellers (::BlockSource &region, int)
MCAPI bool _spawnRaidGroup (::Vec3 spawnPosition, uchar groupNumber, ::std::unordered_set<::ActorUniqueID > &spawnedMobs) const
MCAPI void _tryAddPoiToVillage (::ActorUniqueID const &villager, ::std::weak_ptr<::POIInstance > pi)
MCAPI void _tryShiftStandingsTowardNeutral (::Tick &updateTick, uint64 updateInterval, bool positiveShift)
MCAPI void _trySpawnDefenderDwellers (::BlockSource &region, uint64 bedCount)
MCAPI void _updateAndRemoveInactiveDwellers (uint64 villagerPurgeTime, float villageBorderTolerance)
MCAPI void _updateClaimedPOIs (::BlockSource &region)
MCAPI void _updateUnclaimedPOIs (::BlockSource &region)
MCAPI void addActorToVillage (::DwellerRole role, ::ActorUniqueID const &actorID)
MCAPI void addAggressor (::Mob const &mob)
MCAPI bool addPOI (::std::weak_ptr<::POIInstance > pi)
MCAPI void addVillager (::ActorUniqueID const &villagerID)
MCAPI bool canRemove () const
MCAPI bool checkNeedMoreVillagers () const
MCAPI void clearOwnedPOIs ()
MCAPI void debugDraw ()
MCAPI ::std::weak_ptr<::POIInstancefetchOwnedPOI (::ActorUniqueID const &id, ::POIType type)
MCAPI void fireSoundTheAlarm ()
MCFOLD::AABB const & getBounds () const
MCAPI::Vec3 getCenter () const
MCAPI::Actor * getClosestAggressor (::Actor *from)
MCAPI::Player * getClosestBadStandingPlayer (::Actor &from)
MCAPI ::std::weak_ptr<::POIInstancegetClosestPOI (::POIType type, ::BlockPos const &position)
MCAPI uint64 getPOICount () const
MCFOLD::Raid const * getRaid () const
MCFOLD::AABB const & getRaidBounds () const
MCFOLD::Raid * getRaidMutable ()
MCFOLD::mce::UUID getUniqueID () const
MCAPI bool hasInvalidRole (::ActorUniqueID const &actorId, ::DwellerRole const &role)
MCAPI bool hasRaid () const
MCAPI bool hasSpecificDweller (::DwellerRole role, ::ActorUniqueID const &id) const
MCAPI void loadDataByKey (::std::string const &key, ::CompoundTag const &tag)
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 void removeVillageSavedData ()
MCAPI void resetDwellerTimer (::DwellerRole role, ::ActorUniqueID const &id)
MCAPI void resetNoBreedTimer ()
MCAPI void rewardAllPlayers (int deltaAmount)
MCAPI void setSavedDwellerPosition (::DwellerRole role, ::ActorUniqueID const &id, ::BlockPos pos)
MCAPI void tick (::Tick tick, ::BlockSource &region)
MCAPI void tickRaid (::Tick gameTick)
MCAPI void triggerRaid ()
MCAPI void trySetVillagerWorkTimestamp (::ActorUniqueID const &id)
MCAPI void unlinkMismatchedJobsites (::Actor const &villager)
MCAPI bool villagerLivesHere (::ActorUniqueID const &villager) const
MCAPI bool withinVillageBounds (::Vec3 const &pos, float tolerance) const
MCAPI void * $ctor (::Dimension &dimension, ::mce::UUID id, ::BlockPos const &origin)
MCAPI void $dtor ()

Static Public Member Functions

static MCAPI void _cleanupUnclaimedPOIStack (::std::vector<::std::weak_ptr<::POIInstance > > &unclaimedPOIStack)
static MCAPI ::std::shared_ptr<::POIInstance_findPreferredPOI (::std::vector<::std::weak_ptr<::POIInstance > > &unclaimedPOIStack, ::HashedString const &preferredPOI)
static MCAPI bool isValidBedPOI (::Block const &block)
static MCAPI bool isValidRegisteredPOI (::BlockSource &region, ::Block const &block, ::BlockPos const &position)
static MCAPI bool isVillagePOI (::VillageManager const &villageManager, ::Block const &block)
static MCAPI ::std::string const & CELEBRATION_EVENT ()
static MCAPI bool & DEBUG_DRAWING ()
static MCAPI ::std::string const & RAID_EXPIRY_EVENT ()
static MCAPI ::std::string const & STORAGE_KEY_PREFIX ()

Public Attributes

::ll::TypedStorage< 8, 16, ::mce::UUIDmUniqueID
::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, ::AABBmBounds
::ll::TypedStorage< 4, 24, ::AABBmStaticRaidBounds
::ll::TypedStorage< 1, 1, uchar > mVillageVersion
::ll::TypedStorage< 8, 8, ::TickmGameTick
::ll::TypedStorage< 8, 8, ::TickmSaveTick
::ll::TypedStorage< 8, 8, ::TickmRingTick
::ll::TypedStorage< 8, 8, ::TickmNoBreedTimer
::ll::TypedStorage< 8, 8, ::TickmBadStandingDecayTimer
::ll::TypedStorage< 8, 8, ::TickmGoodStandingDecayTimer
::ll::TypedStorage< 8, 8, ::TickmPassiveDwellerSpawnTimer
::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

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