3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/sound/LoopSoundStage.h"
7#include "mc/deps/core/string/HashedString.h"
8#include "mc/deps/ecs/WeakEntityRef.h"
9#include "mc/platform/brstd/function_ref.h"
10#include "mc/world/actor/player/PlayerListener.h"
11#include "mc/world/level/biome/BiomeIdType.h"
25 using PlaySoundFunc = ::brstd::function_ref<void(::HashedString
const&, ::Vec3
const&)>;
27 using LightThresholdFunc = ::brstd::function_ref<bool(::BrightnessPair, ::BlockPos
const&, ::BrightnessPair)>;
32 ::ll::TypedStorage<4, 4, ::LoopSoundStage> mLoopSoundStage;
33 ::ll::TypedStorage<8, 24, ::WeakEntityRef> mLocalUser;
34 ::ll::TypedStorage<8, 8, ::SoundMapping const&> mSoundMap;
35 ::ll::TypedStorage<8, 8, ::std::chrono::steady_clock::time_point> mNextSoundChangeTime;
36 ::ll::TypedStorage<4, 4, int> mDelayUntilNextMoodSound;
37 ::ll::TypedStorage<2, 2, ::BiomeIdType> mTargetLoopBiomeId;
38 ::ll::TypedStorage<8, 48, ::HashedString> mTargetAmbientLoopSound;
39 ::ll::TypedStorage<2, 2, ::BiomeIdType> mCurrentLoopBiomeId;
40 ::ll::TypedStorage<8, 48, ::HashedString> mCurrentAmbientLoopSound;
41 ::ll::TypedStorage<8, 8, uint64> mCurrentLoop;
42 ::ll::TypedStorage<8, 8, uint64> mPreviousLoop;
43 ::ll::TypedStorage<4, 4, float> mCurrentVolume;
44 ::ll::TypedStorage<4, 4, float> mCurrentPitch;
49 AmbientSoundController& operator=(AmbientSoundController
const&);
50 AmbientSoundController(AmbientSoundController
const&);
51 AmbientSoundController();
56 virtual ~AmbientSoundController() =
default;
58 virtual void onWillChangeDimension(::Player& player) ;
60 virtual void onDimensionChanged(::Player& player) ;
62 virtual void onPlayerDestruction(::Player& player) ;
68 MCAPI AmbientSoundController(::WeakEntityRef localUser, ::SoundMapping
const& soundMap);
70 MCAPI
void _addDelayOrTransitioningToNewStage();
72 MCAPI
void _startLoopSound();
74 MCAPI
void _stopLoopSound(
bool hard);
76 MCAPI
void _tryPlayAdditionSounds(
77 ::Vec3
const& listenerPos,
78 ::brstd::function_ref<
void(::HashedString
const&, ::Vec3
const&)>
const& playSoundFunc
81 MCAPI
void _tryPlayLoopSounds(::Vec3
const& listenerPos);
83 MCAPI
void _tryPlayMoodSound(
84 ::Vec3
const& listenerPos,
85 ::brstd::function_ref<
void(::HashedString
const&, ::Vec3
const&)>
const& playSoundFunc,
86 ::brstd::function_ref<
bool(::BrightnessPair, ::BlockPos
const&, ::BrightnessPair)> lightThresholdFunc
93 MCAPI
void* $ctor(::WeakEntityRef localUser, ::SoundMapping
const& soundMap);
99 MCAPI
void $onWillChangeDimension(::Player& player);
101 MCFOLD
void $onDimensionChanged(::Player& player);
103 MCAPI
void $onPlayerDestruction(::Player& player);
Definition AmbientSoundController.h:5
Definition PlayerListener.h:5
Definition SoundMapping.h:5
Definition BrightnessPair.h:8