Minecraft how to use playsound

Алан-э-Дейл       08.02.2023 г.

Команды только для мобильной версии Майнкрафт ПЕ

Представленные ниже команды будут работать только в Майнкрафт ПЕ на телефоне.

  • /ability — запрет выбранному игроку летать, редактировать мир и писать в чат. Также можно вернуть доступ обратно.
  • /playanimation — Запустить нужную анимацию для игрока или моба
  • /ride — можно оседлать любое животное, монстра, игрока и моба в игре.
  • /setmaxplayers — установить максимально количество игроков на локальном сервере.
  • /structure — загрузить структуру из файла. Еще можно сохранить нужную постройку в файл.
  • /tickingarea — изменить активные области в мире.
  • /transferserver — переместиться на другой сервер
  • /wsserver — подключится к серверу при помощи ссылки.
  1. 5
  2. 4
  3. 3
  4. 2
  5. 1

4.2 / 5 ( 5 голосов )

How to Enter the Command

1. Open the Chat Window

The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:

  • For Java Edition (PC/Mac), press the T key to open the chat window.
  • For Pocket Edition (PE), tap on the chat button at the top of the screen.
  • For Xbox One, press the D-Pad (right) on the controller.
  • For PS4, press the D-Pad (right) on the controller.
  • For Nintendo Switch, press the right arrow button on the controller.
  • For Windows 10 Edition, press the T key to open the chat window.
  • For Education Edition, press the T key to open the chat window.

2. Type the Command

In this example, we are going to stop the Creative music sound effect for the player named DigMinecraft with the following command:

/stopsound DigMinecraft music minecraft:music.creative

Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.

Once the cheat has been entered, the sound effect will temporarily stop playing until it is required again by the game.

You will see the message «Stopped sound ‘minecraft:music.creative’ with source ‘music’ for DigMinecraft» appear in the lower left corner of the game window to indicate that the sound effect has been stopped.

Congratulations, you have learned how to use the /stopsound command in Minecraft.

Структура файла[]

Этот файл хранится в формате JSON, но здесь представлен в формате NBT.

  • Корневой объект
    • Звуковое событие. Название этого объекта — это название звукового события, которое сделано по образцу пути к звуковому файлу (как «random.break»). Все стандартные звуки находятся в таблице ниже.
      •  category: Категория, к которой относится этот звук. Возможные названия категорий: (окружение), (погода), (игроки), (дружелюбные существа), (враждебные существа), (блоки), (музыкальные блоки), (музыка), (общее) и (голос/речь). Эта строка даёт звуковой системе понять к какой категории относится то или иное звуковое событие, так что громкость может быть отрегулирована на основании того, какие параметры звука устанавливаются для каждой категории.
      •  replace: true/false. Используется только в ресурспаках. Если true, то звук, записанный в sounds, заменит звуки, записанные в стандартном файле sounds.json для этого звукового события. Если false, то записанные звуки будут добавлены в стандартный список звуков. Необязательно. Если нет, по стандарту устанавливается значение false. В версиях до 1.7.6-pre1 эта строка проигнорирована из-за ошибки.
      •  sounds: Звуковые файлы, которые использует это звуковое событие. Один из звуков случайно выбирается для проигрывания когда звуковое событие запущено. Изменяемо.
        • Путь до звукового файла из папки «sounds». Использует «/».
        • Звуковой файл. Этот объект используется только в случае, если звуку нужны дополнительные строки.
          •  name: Путь до этого звукового файла из папки «sounds». Использует «/» вместо «\». Также может быть названием другого звукового события.
          •  volume: Громкость с которой будет воспроизведён этот звук. Значение от 0.0 до 1.0. Если нет, по стандарту 1.0.
          •  pitch: Изменяет высоту звука. Если нет, по стандарту 1.0, но могут быть выбраны значения выше и ниже.
          •  weight: Шанс, с которым этот звук будет выбран для воспроизведения, если произошло звуковое событие. По умолчанию 1. Пример: при значении 2 звук будет воспроизводится в 2 раза чаще. Допускаются только целые значения.
          •  stream: true/false. Если true, то этот звук будет передаваться прямо из файла. Рекомендуется устанавливать значение true для всех длинных звуков, чтобы предотвратить падение производительности. Используется для всех звуков в категориях «music» и «record» (кроме звуков нотного блока), так как почти все звуки этих категорий длятся более минуты. Необязательно. По умолчанию false.
          •  type: Возможны два значения: «sound» и «event»; «sound» воспроизводится с именем файла, в то время как «event» воспроизводится с уже определённым событием. Если значение не установлено, устанавливается «sound».

Underwater ambience[]

This feature is exclusive to Java Edition. 

Not to be confused with the sound produced by flowing water.

Underwater ambience plays while the player’s head is underwater. There are 22 different underwater ambience sounds in total.

They can be heard within a body of water of any size and in any dimension.

Underwater ambience is divided into two groups: «Loop» and «Loop Additions». Both of these play independently of each other while player is underwater. Additionally, «Loop Additions» are divided into 3 more groups.

Its code name is ambient.underwater.<group code name>

Note that Rare Loop Addition’s and Ultra Rare Loop Addition’s rarity is exaggerated in their name. Their names are derived from their in-game code names.

Group Info Code Name
Loop Plays in never-ending loop for as long as player is underwater ambient.underwater.loop
Loop Additions Plays commonly while player is underwater ambient.underwater.loop.additions
Rare Loop Additions Plays uncommonly while player is underwater ambient.underwater.loop.additions.rare
Ultra Rare Loop Additions Plays rarely while player is underwater ambient.underwater.loop.additions.ultra_rare
List
Name Sound Group
Underwater Ambience https://minecraft.fandom.com/wiki/File:Underwater_Ambience.ogg Loop
Bubbles 1 https://minecraft.fandom.com/wiki/File:Bubbles1.ogg Loop Additions
Bubbles 2 https://minecraft.fandom.com/wiki/File:Bubbles2.ogg
Bubbles 3 https://minecraft.fandom.com/wiki/File:Bubbles3.ogg
Bubbles 4 https://minecraft.fandom.com/wiki/File:Bubbles4.ogg
Bubbles 5 https://minecraft.fandom.com/wiki/File:Bubbles5.ogg
Bubbles 6 https://minecraft.fandom.com/wiki/File:Bubbles6.ogg
Water 1 https://minecraft.fandom.com/wiki/File:Water1.ogg
Water 2 https://minecraft.fandom.com/wiki/File:Water2.ogg
Animal 1 https://minecraft.fandom.com/wiki/File:Animal1.ogg Rare Loop Additions
Bass Whale 1 https://minecraft.fandom.com/wiki/File:Bass_Whale1.ogg
Bass Whale 2 https://minecraft.fandom.com/wiki/File:Bass_Whale2.ogg
Crackles 1 https://minecraft.fandom.com/wiki/File:Crackles1.ogg
Crackles 2 https://minecraft.fandom.com/wiki/File:Crackles2.ogg
Driplets 1 https://minecraft.fandom.com/wiki/File:Driplets1.ogg
Driplets 2 https://minecraft.fandom.com/wiki/File:Driplets2.ogg
Earth Crack https://minecraft.fandom.com/wiki/File:Earth_Crack.ogg
Animal 2 https://minecraft.fandom.com/wiki/File:Animal2.ogg Ultra Rare Loop Additions
Dark 1 https://minecraft.fandom.com/wiki/File:Dark1.ogg
Dark 2 https://minecraft.fandom.com/wiki/File:Dark2.ogg
Dark 3 https://minecraft.fandom.com/wiki/File:Dark3.ogg
Dark 4 https://minecraft.fandom.com/wiki/File:Dark4.ogg

Добавление звука дождя

AudioBP_CloudAudioRainAudioSoundSoundS_Rain
RainAudioActivationAuto Activate
RainAudioEnableRainEnableRain

Настройка затухания

RainAudioAttenuationOverride AttenuationAttenuation Overrides

  • Radius: максимальное расстояние, на котором может быть игрок, прежде чем громкость начнёт уменьшаться
  • Falloff Distance: расстояние, на котором может быть игрок, прежде чем звук станет неслышным. Это расстояние прибавляется к радиусу.

RadiusFalloff DistanceRadius300Falloff Distance400
300700

Плавное снижение громкости звука

FadeOutGraphsДважды щёлкнитеFadeOutEventGraphFadeOutTimelineFadeTimelineAlphaRainAudioПримечание:дважды щёлкнутьTimelineTimelinesофициальную документациюS_RainS_RainVirtualize when SilentCompileBP_CloudAudioS_RainSoundVirtualize when Silent
S_RainS_RainPlaySound ClassSound Mix

Звуковые события[]

Звуковое событие связано с одним или с несколькими игровыми событиями. Два события могут иметь один и тот же звуковой файл, но соответствовать различным внутриигровым событиям и/или относятся к разным категориям звука. Несколько доступных звуковых событий не включены в sounds.json, в то время как некоторые другие не имеют в игре события, связанные с ними. Любое звуковое событие, для которого нет внутриигрового события могут быть воспроизведены только с помощью .

Cписок звуковых событий можно посмотреть в этом списке. Все звуковые события, звуки, которыми они пользуются, субтитрами, которые показываются на экране во время этого события, перечислены ниже.

Самые полезные команды в Майнкрафт

Давайте рассмотрим самые полезные и популярные команды в Майнкрафт, которые использовал каждый игрок со 100% вероятностью!

/help

  • Что он делает: отображает список всех консольных команд или предоставляет информацию о том, как использовать определенную команду.
  • Синтаксис: / help
  • Пример: / help playsound

/gamemode

  • Что он делает: Устанавливает игровой режим указанного игрока.
  • Синтаксис: / gamemode <режим>
  • Пример: / gamemode creative @a

/ tp

  • Что он делает: телепортирует указанную сущность или объекты в указанное место назначения. Сокращение для / телепорт.
  • Синтаксис:
    • / tp <место назначения>
    • / tp <расположение>
    • / tp <цели> <место назначения>
    • / tp <цели> <объект>
    • / tp <targets> <location> обращен к <facingLocation>
    • / tp <targets> <location> перед объектом <facingEntity>
    • / tp <цели> <расположение>
  • Пример: / tp @a TheDarkLord999

/time

  • Что он делает: позволяет вам проверять или изменять время суток.
  • Синтаксис: / время <добавить | запрос | установить> <значение>
  • Пример: / time set day

/weather

  • Что он делает: устанавливает погоду.
  • Синтаксис: / weather <clear | rain | thunder>
  • Пример: / weather thunder 1200

/give

  • Что он делает: дает игроку предмет.
  • Синтаксис: / give <игрок> <элемент>
  • Пример: / give @p diamond_shovel 1

/locate

  • Что он делает: находит ближайшую структуру указанного типа.
  • Синтаксис: / locate <тип структуры>
  • Пример: / найти крепость

/ enchant

  • Что он делает: зачаровывает предмет игрока.
  • Синтаксис: / enchant <игрок> <идентификатор чар>
  • Пример: / enchant @p minecraft: резкость 5

/ xp

  • Что он делает: добавляет, устанавливает, удаляет или проверяет опыт игрока. Сокращение для / опыт.
  • Синтаксис:
    • / xp <игроки> <количество>
    • / xp query <игрок> <очки | уровни>
  • Пример: / xp установить @a 0 уровней

How to Enter the Command

1. Open the Chat Window

The easiest way to run a command in Minecraft is within the chat window. The game control to open the chat window depends on the version of Minecraft:

  • For Java Edition (PC/Mac), press the T key to open the chat window.
  • For Pocket Edition (PE), tap on the chat button at the top of the screen.
  • For Xbox One, press the D-Pad (right) on the controller.
  • For PS4, press the D-Pad (right) on the controller.
  • For Nintendo Switch, press the right arrow button on the controller.
  • For Windows 10 Edition, press the T key to open the chat window.
  • For Education Edition, press the T key to open the chat window.

2. Type the Command

In this example, we are going to play the eerie, ambient sound of an elder guardian for the player named DigMinecraft with the following command:

/playsound minecraft:entity.elder_guardian.ambient voice DigMinecraft

Type the command in the chat window. As you are typing, you will see the command appear in the lower left corner of the game window. Press the Enter key to run the command.

Once the cheat has been entered, the sound effect will start playing for the player.

You will see the message «Played sound ‘minecraft:entity.elder_guardian.ambient’ to DigMinecraft» appear in the lower left corner of the game window to indicate that the sound effect has been played.

Congratulations, you have learned how to use the /playsound command in Minecraft.

Parameters

  • pszSound
    A string that specifies the sound to play. The maximum length, including the null terminator, is 256 characters. If this parameter is NULL, any currently playing waveform sound is stopped. To stop a non-waveform sound, specify SND_PURGE in the fdwSound parameter.

    Three flags in fdwSound (SND_ALIAS, SND_FILENAME, and SND_RESOURCE) determine whether the name is interpreted as an alias for a system event, a file name, or a resource identifier. If none of these flags are specified, PlaySound searches the registry or the WIN.INI file for an association with the specified sound name. If an association is found, the sound event is played. If no association is found in the registry, the name is interpreted as a file name.

  • hmod
    Handle to the executable file that contains the resource to be loaded. This parameter must be NULL unless SND_RESOURCE is specified in fdwSound.

  • fdwSound
    Flags for playing the sound. The following values are defined.

    Value Meaning
    SND_APPLICATION The pszSound parameter is an application-specific alias in the registry. You can combine this flag with the SND_ALIAS or SND_ALIAS_ID flag to specify an application-defined sound alias.
    SND_ALIAS The pszSound parameter is a system-event alias in the registry or the WIN.INI file. Do not use with either SND_FILENAME or SND_RESOURCE.
    SND_ALIAS_ID The pszSound parameter is a predefined identifier for a system-event alias. See Remarks.
    SND_ASYNC The sound is played asynchronously and PlaySound returns immediately after beginning the sound. To terminate an asynchronously played waveform sound, call PlaySound with pszSound set to NULL.
    SND_FILENAME The pszSound parameter is a file name. If the file cannot be found, the function plays the default sound unless the SND_NODEFAULT flag is set.
    SND_LOOP The sound plays repeatedly until PlaySound is called again with the pszSound parameter set to NULL. If this flag is set, you must also set the SND_ASYNC flag.
    SND_MEMORY The pszSound parameter points to a sound loaded in memory.

    For more information, see Playing WAVE Resources.

    SND_NODEFAULT No default sound event is used. If the sound cannot be found, PlaySound returns silently without playing the default sound.
    SND_NOSTOP

    The specified sound event will yield to another sound event that is already playing in the same process. If a sound cannot be played because the resource needed to generate that sound is busy playing another sound, the function immediately returns FALSE without playing the requested sound.

    If this flag is not specified, PlaySound attempts to stop any sound that is currently playing in the same process. Sounds played in other processes are not affected.

    SND_NOWAIT

    Not supported.

    Note  Previous versions of the documentation implied incorrectly that this flag is supported. The function ignores this flag.

    SND_PURGE Not supported.
    SND_RESOURCE The pszSound parameter is a resource identifier; hmod must identify the instance that contains the resource.

    For more information, see Playing WAVE Resources.

    SND_SENTRY

    Note  Requires Windows Vista or later.

    If this flag is set, the function triggers a SoundSentry event when the sound is played.

    SoundSentry is an accessibility feature that causes the computer to display a visual cue when a sound is played. If the user did not enable SoundSentry, the visual cue is not displayed.

    SND_SYNC The sound is played synchronously, and PlaySound returns after the sound event completes. This is the default behavior.
    SND_SYSTEM

    Note  Requires Windows Vista or later.

    If this flag is set, the sound is assigned to the audio session for system notification sounds. The system volume-control program (SndVol) displays a volume slider that controls system notification sounds. Setting this flag puts the sound under the control of that volume slider

    If this flag is not set, the sound is assigned to the default audio session for the application’s process.

    For more information, see the documentation for the Core Audio APIs.

Пещерные звуки[]

Тёмная пещера: здесь чаще всего слышатся фоновые пещерные звуки.

Пещерные фоновые звуки, или жуткий шум (согласно субтитрам), — это звуки, которые могут воспроизводиться, когда игрок находится в тёмной области или под землей. Всего существует 19 различных пещерных звуков.

Возникнуть пещерные звуки могут в любое время, в любом измерении, в любом свободном от блоков пространстве, при уровне освещения ниже 8. Звуки можно услышать, находясь в 10—20 блоках от источника звуков в любом направлении, при этом точка-источник может быть в непосредственной видимости игрока. Также условия для воспроизведения звуков можно воспроизвести, иными словами, определение допустимых точек-источников пещерных звуков основывается на текущей, а не изначальной, геометрии мира.

Проигрывание пещерных фоновых звуков зависит от уровня настроения. Настроение (от англ. mood) — это значение в процентах от 0 до 100. Когда игрок находится под землёй или в тёмном месте, уровень настроения увеличивается, а когда нет — наоборот, снижается. Если уровень настроения достигнет 100 %, проигрывается один из пещерных звуков, после чего значение настроения аннулируется и цикл повторяется заново. Настроение и его текущее значение можно увидеть на экране отладки.

Пещерные фоновые звуки можно найти по пути . В самой игре тон звука может меняться в некоторых пределах.

Пещера 1
Пещера 2
Пещера 3
Пещера 4
Пещера 5
Пещера 6
Пещера 7
Пещера 8
Пещера 9
Пещера 10
Пещера 11
Пещера 12
Пещера 13
Пещера 14
Пещера 15
Пещера 16
Пещера 17
Пещера 18
Пещера 19

Подводные звуки[]

В океане чаще всего слышатся подводные фоновые звуки.

Подводные фоновые звуки проигрываются, когда игрок полностью находится под водой. Всего существует 22 подводных фоновых звука.

Эти звуки можно услышать в водоёме любого размера и в любом измерении.

Подводные фоновые звуки делятся на 2 группы: «Loop» и «Loop Additions». Они проигрываются независимо друг от друга. Кроме того, группа «Loop Additions» делится еще на 3 подгруппы.

Название подводных фоновых звуков в коде игры — ambient.underwater. <название группы в коде игры>

Группа Информация Название в коде игры
Loop Проигрывается бесконечно, пока игрок находится под водой ambient.underwater.loop
Loop Additions Проигрываются, когда игрок находится под водой ambient.underwater.loop.additions
Rare Loop Additions Проигрываются не так часто, когда игрок находится под водой ambient.underwater.loop.additions.rare
Ultra Rare Loop Additions Проигрываются редко, когда игрок находится под водой ambient.underwater.loop.additions.ultra_rare
Название Звук Группа
Underwater Ambience https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Underwater_Ambience.ogg Loop
Bubbles 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bubbles1.ogg Loop Additions
Bubbles 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bubbles2.ogg
Bubbles 3 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bubbles3.ogg
Bubbles 4 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bubbles4.ogg
Bubbles 5 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bubbles5.ogg
Bubbles 6 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bubbles6.ogg
Water 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Water1.ogg
Water 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Water2.ogg
Animal 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Animal1.ogg Rare Loop Additions
Bass Whale 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bass_Whale1.ogg
Bass Whale 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Bass_Whale_2.ogg
Crackles 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Crackles1.ogg
Crackles 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Crackles2.ogg
Driplets 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Driplets1.ogg
Driplets 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Driplets2.ogg
Earth Crack https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Earth_Crack.ogg
Animal 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Animal2.ogg Ultra Rare Loop Additions
Dark 1 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Dark1.ogg
Dark 2 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Dark2.ogg
Dark 3 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Dark3.ogg
Dark 4 https://minecraft.fandom.com/ru/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:Dark4.ogg

Extracting Minecraft Music On Mac[]

  1. Create a new file (for example from the terminal): vi minecraft-music-extractor.sh
  2. Paste the following into the file:
 1 #!/bin/sh
 2 #
 3 # Description: Minecraft Music Extractor
 4 
 5 MINECRAFT_ASSETS_DIR="/Users/YOURUSERNAMEHERE/Library/Application Support/minecraft/assets"
 6 OUTPUT_DIR="/Users/YOURUSERNAMEHERE/Desktop"
 7 JSON_FILE="/Users/YOURUSERNAMEHERE/Library/Application Support/minecraft/assets/indexes/YOURJSON.json"
 8 
 9 #for ENTRY in `cat "$JSON_FILE" | python -c 'import sys,json; from pprint import pprint; data = json.load(sys.stdin); pprint(data);' | grep music | awk -F\' '{print $2 "," $6}'`
10 #cat "$JSON_FILE" | python -c 'import sys,json; from pprint import pprint; data = json.load(sys.stdin); pprint(data);'
11 #cat "$JSON_FILE" | python -c 'import sys,json; from pprint import pprint; data = json.load(sys.stdin); pprint(data);' | grep music
12 
13 
14 for ENTRY in `cat "$JSON_FILE" | python -c 'import sys,json; from pprint import pprint; data = json.load(sys.stdin); pprint(data);' | grep sounds | awk -F\' '{print $2 "," $6}'`
15 do
16   echo "Processing $ENTRY..."
17   echo $ENTRY | cut -d, -f1 
18   FILENAME=`echo $ENTRY | cut -d, -f1`
19   FILEHASH=`echo $ENTRY | cut -d, -f2`
20 
21   #Locate the file in the assets directory structure
22   FULLPATH_HASHFILE=`find "$MINECRAFT_ASSETS_DIR" -name $FILEHASH`
23 
24   #Copy the file
25 
26   mkdir -p  $OUTPUT_DIR/`echo $FILENAME | sed -E 's/\/+\..+//'`
27   cp "$FULLPATH_HASHFILE" "$OUTPUT_DIR$FILENAME"
28 
29 done
  1. Update the variables (e.g. MINECRAFT_ASSETS_DIR) with your correct directory paths
  2. If you want all sounds, replace «grep music» with «grep sounds».
  3. Run the script from terminal with «bash minecraft-music-extractor.sh».
Гость форума
От: admin

Эта тема закрыта для публикации ответов.