40 enum class SpawningLogicState :
int {
42 WaitingForPlayers = 1,
44 WaitingForRewardEjection = 3,
54 ::ll::TypedStorage<1, 1, bool> haveTrialOmen;
55 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> foundPlayers;
75 ::ll::TypedStorage<8, 152, ::ItemStack> itemStack;
95 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mDetectedPlayers;
96 ::ll::TypedStorage<8, 24, ::std::vector<::ActorUniqueID>> mCurrentMobs;
97 ::ll::TypedStorage<8, 8, uint64> mCooldownEndsAt;
98 ::ll::TypedStorage<8, 8, uint64> mNextMobSpawnsAt;
99 ::ll::TypedStorage<4, 4, int> mTotalMobsSpawned;
100 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SpawnData>> mNextSpawnData;
101 ::ll::TypedStorage<8, 32, ::std::string> mSelectedLootTableName;
102 ::ll::TypedStorage<4, 4, int> mOpeningDelay;
103 ::ll::TypedStorage<4, 4, int> mEjectionDelay;
104 ::ll::TypedStorage<4, 4, int> mMaxDistance;
105 ::ll::TypedStorage<8, 24, ::std::vector<::TrialSpawner::WeightedItemStack>> mDispensing;
106 ::ll::TypedStorage<8, 176, ::ActorDefinitionIdentifier> mActorDefId;
107 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mDisplayEntity;
108 ::ll::TypedStorage<4, 4, float> mCurrentSpinSpeed;
109 ::ll::TypedStorage<4, 4, float> mPreviousSpinSpeed;
130 ::ll::TypedStorage<4, 12, ::BlockPos const> mPosition;
131 ::ll::TypedStorage<4, 4, int> mPlayerSearchRange;
132 ::ll::TypedStorage<8, 360, ::TrialSpawner::Data> mData;
133 ::ll::TypedStorage<8, 144, ::TrialSpawnerConfig> mNormalConfig;
134 ::ll::TypedStorage<8, 144, ::TrialSpawnerConfig> mOminousConfig;
135 ::ll::TypedStorage<1, 1, bool> mIsOminous;
136 ::ll::TypedStorage<1, 1, bool> hasSpawnedItemSpawner;
144 MCAPI
void _dispenseItemAboveRandomCombatant(
::BlockSource& region);
146 MCAPI ::TrialSpawner::PlayerScanResult _doPlayerScan(
::BlockSource& region);
150 MCAPI ::std::vector<::TrialSpawner::WeightedItemStack>& _getDispensingItems(
::BlockSource& region);
152 MCAPI ::std::optional<::Vec3>
153 _getPositionToSpawnItemSpawner(
::BlockSource& region, ::std::vector<::ActorUniqueID>
const& eligibleActorIds)
const;
157 MCAPI
void _selectLootTable(
::Level& level);
159 MCAPI
void _sendParticlesForState(
::BlockSource& region,
::BlockPos pos, ::TrialSpawner::SpawningLogicState state);
169 MCAPI
void _tryRegisterNewPlayers(
::BlockSource& region, ::TrialSpawner::SpawningLogicState currentState);
175 MCAPI ::Mob* createAndAddDisplayEntity(
::BlockSource& region);
177 MCAPI ::SpawnData
const* getOrCreateNextSpawnData(
::Random& random);
179 MCAPI ::TrialSpawner::SpawningLogicState getSpawningLogicState(
::BlockSource& region)
const;
183 MCAPI
void removeDisplayEntity();
197 MCAPI
static void _ejectResultItems(
200 ::std::vector<::ItemStack>
const& items,
204 MCAPI static ::std::optional<::Vec3>
207 MCAPI static ::std::vector<::ItemStack> _getRandomLootTableItems(
210 ::DimensionType dimensionType,
211 ::std::string
const& lootTableName
214 MCAPI_C
static char const* _getSmallFlameParticleName(
bool isOminous);
216 MCAPI
static bool _isAllowedToSpawnInLevel(
::Level& level);
220 MCAPI
static void _removeMobByGameplay(
::Level& level,
::Actor& mob);
224 MCAPI_C
static void addSpawnParticles(
::Level& level,
::Vec3 pos,
bool isOminous);
226 MCAPI_C
static void sendEjectItemParticles(
::Level& level,
::BlockPos pos,
bool isOminous);