3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/sound/EventToSoundListMap.h"
7#include "mc/deps/core/string/HashedString.h"
8#include "mc/deps/core/utility/NonOwnerPointer.h"
9#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
10#include "mc/platform/brstd/flat_map.h"
11#include "mc/util/molang/ExpressionNode.h"
20namespace Json {
class Value; }
38 using is_transparent = void;
45 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>> mBaseSounds;
51 ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>,
52 ::SoundMapping::SoundVariantCompare,
53 ::std::vector<::HashedString>,
54 ::std::vector<::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>>>>
56 ::ll::TypedStorage<8, 16, ::ExpressionNode> mVariantKey;
64 ::ll::TypedStorage<8, 80, ::EventToSoundListMap> mBaseSounds;
70 ::EventToSoundListMap,
71 ::SoundMapping::SoundVariantCompare,
72 ::std::vector<::HashedString>,
73 ::std::vector<::EventToSoundListMap>>>
75 ::ll::TypedStorage<8, 16, ::ExpressionNode> mVariantKey;
83 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>> mSounds;
84 ::ll::TypedStorage<8, 32, ::std::string> mBaseBlock;
92 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds>> mDefaultBlockSounds;
93 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::SoundMapping::EntitySoundList>>
98 using EventSoundMap = ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>;
100 using NamedSoundMap = ::std::unordered_map<::HashedString, ::Sound>;
105 ::ll::TypedStorage<8, 64, ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>> mEventSounds;
106 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::Sound>> mNamedSounds;
107 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::SoundMapping::EntitySounds>> mEntitySounds;
108 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds>> mBlockSounds;
109 ::ll::TypedStorage<8, 128, ::SoundMapping::ActorInteractiveSounds> mEntityInteractiveSounds;
115 virtual ~SoundMapping() =
default;
122 ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds>
const& blockSounds,
123 ::SharedTypes::Legacy::LevelSoundEvent eventType,
124 ::std::string
const& blockType
130 ::SharedTypes::Legacy::LevelSoundEvent eventType,
135 ::SharedTypes::Legacy::LevelSoundEvent eventType,
139 MCNAPI ::Sound
const&
getEventSound(::SharedTypes::Legacy::LevelSoundEvent eventType)
const;
144 ::SharedTypes::Legacy::LevelSoundEvent eventType,
146 ::std::string
const& blockType,
156 ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds>& blockSoundList
161 ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds>& blockSounds,
162 ::std::unordered_map<::std::string, ::SoundMapping::EntitySoundList>& entitySoundLists
167 ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound>& eventSoundMap,
Definition ActorSoundIdentifier.h:17
Definition NonOwnerPointer.h:9
Definition HashedString.h:5
Definition LinkedAssetValidator.h:9
Definition SoundMapping.h:5
MCAPI::Sound const & _getBlockSound(::std::unordered_map<::std::string, ::SoundMapping::BlockSounds > const &blockSounds, ::SharedTypes::Legacy::LevelSoundEvent eventType, ::std::string const &blockType) const
MCAPI::Sound const & getEntitySound(::SharedTypes::Legacy::LevelSoundEvent eventType, ::ActorSoundIdentifier const &actorSoundIdentifier) const
MCAPI::Sound getSound(::SharedTypes::Legacy::LevelSoundEvent eventType, ::ActorSoundIdentifier const &actorSoundIdentifier, ::std::string const &blockType, ::Random &rand) const
static MCAPI void _loadEntityInteractiveSounds(::Json::Value const &root, ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds > &blockSounds, ::std::unordered_map<::std::string, ::SoundMapping::EntitySoundList > &entitySoundLists)
MCAPI::Sound const & getEventSound(::SharedTypes::Legacy::LevelSoundEvent eventType) const
static MCAPI void _loadEventSounds(::Json::Value const &root, ::std::unordered_map<::SharedTypes::Legacy::LevelSoundEvent, ::Sound > &eventSoundMap, bool allowEmpty)
MCAPI void _loadSounds(::Json::Value const &json, ::Bedrock::NonOwnerPointer<::LinkedAssetValidator > validator)
MCAPI::Sound const & getNamedSound(::HashedString const &name) const
MCAPI bool canPlayEntitySound(::SharedTypes::Legacy::LevelSoundEvent eventType, ::ActorDefinitionIdentifier const &identifier) const
static MCAPI void _loadBlockSounds(::Json::Value const &root, ::std::unordered_map<::std::string, ::SoundMapping::BlockSounds > &blockSoundList)
Definition ActorDefinitionIdentifier.h:15
Definition SoundMapping.h:25
Definition SoundMapping.h:23
Definition SoundMapping.h:21
Definition SoundMapping.h:19
Definition SoundMapping.h:17