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 UnclaimedPOIList = ::std::array<::std::vector<::std::weak_ptr<::POIInstance>>, 3>
 
using DwellerMap = ::std::unordered_map<::ActorUniqueID, ::Village::DwellerData>
 
using ClaimedPOIList = ::std::unordered_map<::ActorUniqueID, ::std::array<::std::weak_ptr<::POIInstance>, 3>>
 
using DwellerTimestamp = ::std::pair<::ActorUniqueID, ::Tick>
 

Public Member Functions

MCAPI Village (::Dimension &dimension, ::mce::UUID id, ::BlockPos const &origin)
 
MCAPI void _calcPOIDist ()
 
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 _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 _sendSoundTheAlarmAchievement (::Player const &player) 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 checkNeedMoreVillagers () const
 
MCAPI void debugDraw ()
 
MCAPI ::std::weak_ptr<::POIInstancefetchOwnedPOI (::ActorUniqueID const &id, ::POIType type)
 
MCAPI uint64 getBedPOICount () const
 
MCAPI::Actor * getClosestAggressor (::Actor *from)
 
MCAPI ::std::weak_ptr<::POIInstancegetClosestPOI (::POIType type, ::BlockPos const &position)
 
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 rewardAllPlayers (int deltaAmount)
 
MCAPI void tick (::Tick tick, ::BlockSource &region)
 
MCAPI void tickRaid (::Tick gameTick)
 
MCAPI void triggerRaid ()
 
MCAPI void unlinkMismatchedJobsites (::Actor const &villager)
 
MCAPI bool villagerLivesHere (::ActorUniqueID const &villager) const
 
MCAPI void * $ctor (::Dimension &dimension, ::mce::UUID id, ::BlockPos const &origin)
 
MCAPI void $dtor ()
 

Static Public Member Functions

static MCAPI ::std::shared_ptr<::POIInstance_findPreferredPOI (::std::vector<::std::weak_ptr<::POIInstance > > &unclaimedPOIStack, ::HashedString const &preferredPOI)
 
static MCAPI bool isVillagePOI (::VillageManager const &villageManager, ::Block const &block)
 
static MCAPI ::std::string const & CELEBRATION_EVENT ()
 
static MCAPI bool & DEBUG_DRAWING ()
 
static MCAPI ::Vec3 const & RAID_BOUNDS_PADDING ()
 
static MCAPI ::std::string const & RAID_EXPIRY_EVENT ()
 
static MCAPI int const & RAID_FINISHED_DELAY_IN_TICKS ()
 
static MCAPI int const & RAID_GROUP_COMPLETE_DELAY_IN_TICKS ()
 
static MCAPI int const & RAID_LOCATION_HELP_DELAY_IN_TICKS ()
 
static MCAPI uchar const & RAID_MAX_SPAWN_FAILURES ()
 
static MCAPI int const & RAID_PREP_TIME_IN_TICKS ()
 
static MCAPI ::Tick const & RAID_TIMEOUT_IN_TICKS ()
 
static MCAPI ::std::string const & STORAGE_KEY_DWELLERS ()
 
static MCAPI ::std::string const & STORAGE_KEY_PLAYERS ()
 
static MCAPI ::std::string const & STORAGE_KEY_POI ()
 
static MCAPI ::std::string const & STORAGE_KEY_PREFIX ()
 
static MCAPI ::std::string const & STORAGE_KEY_RAID ()
 
static MCAPI ::std::string const & STORAGE_KEY_VILLAGE ()
 

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: