Skip to content

Package net.minecraft.client.sounds

Part 1/1


AudioStream

  • Full name: net.minecraft.client.sounds.AudioStream
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/AudioStream.java
  • Type: interface
  • Modifiers: public
  • Implements: Closeable

net.minecraft.client.sounds.AudioStream#getFormat()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/AudioStream.java:12
  • Modifiers: ``
  • Return: AudioFormat

คืออะไร

อ่านค่า Format

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

AudioStream instance = ...;
AudioFormat result = instance.getFormat();

net.minecraft.client.sounds.AudioStream#read(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/AudioStream.java:14
  • Modifiers: ``
  • Return: ByteBuffer

คืออะไร

อ่าน read

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • int i

Throws

  • IOException

ตัวอย่างใช้งาน

AudioStream instance = ...;
ByteBuffer result = instance.read(0);

ChannelAccess

  • Full name: net.minecraft.client.sounds.ChannelAccess
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/ChannelAccess.java
  • Type: class
  • Modifiers: public

net.minecraft.client.sounds.ChannelAccess#ChannelAccess(Library,Executor)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:23
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ChannelAccess ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: library, executor.

Parameters

  • Library library
  • Executor executor

ตัวอย่างใช้งาน

Library library = ...;
Executor executor = ...;
ChannelAccess instance = new ChannelAccess(library, executor);

net.minecraft.client.sounds.ChannelAccess#clear()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:62
  • Modifiers: public
  • Return: void

คืออะไร

ล้าง clear

ทำงานยังไง

เรียกต่อ: forEach().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChannelAccess instance = ...;
instance.clear();

net.minecraft.client.sounds.ChannelAccess#createHandle(Library.Pool)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:28
  • Modifiers: public
  • Return: CompletableFuture<ChannelAccess.ChannelHandle>

คืออะไร

สร้าง Handle

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: execute(), acquireChannel(), ChannelHandle(), add(), complete(). สร้างออบเจ็กต์: CompletableFuture<>, ChannelAccess.ChannelHandle. คืนค่า: completableFuture.

Parameters

  • Library.Pool pool

ตัวอย่างใช้งาน

ChannelAccess instance = ...;
Library.Pool pool = ...;
CompletableFuture<ChannelAccess.ChannelHandle> result = instance.createHandle(pool);

net.minecraft.client.sounds.ChannelAccess#executeOnChannels(Consumer<Stream<Channel>>)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:43
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน On Channels

ทำงานยังไง

เรียกต่อ: execute(), accept(), stream(), map(), filter().

Parameters

  • Consumer<Stream<Channel>> consumer

ตัวอย่างใช้งาน

ChannelAccess instance = ...;
Consumer<Stream<Channel>> consumer = ...;
instance.executeOnChannels(consumer);

net.minecraft.client.sounds.ChannelAccess#scheduleTick()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:47
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ scheduleTick ตาม implementation ของ ChannelAccess

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: execute(), iterator(), hasNext(), next(), updateStream(), stopped(), release(), remove().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChannelAccess instance = ...;
instance.scheduleTick();

ChannelAccess$ChannelHandle

  • Full name: net.minecraft.client.sounds.ChannelAccess$ChannelHandle
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/ChannelAccess.java
  • Type: class
  • Modifiers: public

net.minecraft.client.sounds.ChannelAccess$ChannelHandle#ChannelHandle(Channel)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:77
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ChannelAccess.ChannelHandle ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: channel.

Parameters

  • Channel channel

ตัวอย่างใช้งาน

Channel channel = ...;
ChannelAccess.ChannelHandle instance = new ChannelAccess.ChannelHandle(channel);

net.minecraft.client.sounds.ChannelAccess$ChannelHandle#execute(Consumer<Channel>)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:81
  • Modifiers: public
  • Return: void

คืออะไร

สั่งทำงาน execute

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: accept().

Parameters

  • Consumer<Channel> consumer

ตัวอย่างใช้งาน

ChannelAccess.ChannelHandle instance = ...;
Consumer<Channel> consumer = ...;
instance.execute(consumer);

net.minecraft.client.sounds.ChannelAccess$ChannelHandle#isStopped()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:73
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Stopped

ทำงานยังไง

คืนค่า: this.stopped.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChannelAccess.ChannelHandle instance = ...;
boolean result = instance.isStopped();

net.minecraft.client.sounds.ChannelAccess$ChannelHandle#release()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChannelAccess.java:89
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ release ตาม implementation ของ ChannelAccess$ChannelHandle

ทำงานยังไง

แก้ state: stopped, channel. เรียกต่อ: releaseChannel().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChannelAccess.ChannelHandle instance = ...;
instance.release();

ChunkedSampleByteBuf

  • Full name: net.minecraft.client.sounds.ChunkedSampleByteBuf
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/ChunkedSampleByteBuf.java
  • Type: class
  • Modifiers: public
  • Implements: FloatConsumer

net.minecraft.client.sounds.ChunkedSampleByteBuf#accept(float)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChunkedSampleByteBuf.java:24
  • Modifiers: public
  • Return: void

คืออะไร

รับค่า accept

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: currentBuffer, byteCount. เรียกต่อ: remaining(), flip(), add(), createByteBuffer(), clamp(), putShort().

Parameters

  • float f

ตัวอย่างใช้งาน

ChunkedSampleByteBuf instance = ...;
instance.accept(0.0F);

net.minecraft.client.sounds.ChunkedSampleByteBuf#ChunkedSampleByteBuf(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChunkedSampleByteBuf.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ ChunkedSampleByteBuf ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: bufferSize, currentBuffer. เรียกต่อ: createByteBuffer().

Parameters

  • int i

ตัวอย่างใช้งาน

ChunkedSampleByteBuf instance = new ChunkedSampleByteBuf(0);

net.minecraft.client.sounds.ChunkedSampleByteBuf#get()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChunkedSampleByteBuf.java:37
  • Modifiers: public
  • Return: ByteBuffer

คืออะไร

อ่านค่า get

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: flip(), isEmpty(), createByteBuffer(), forEach(), put(). มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChunkedSampleByteBuf instance = ...;
ByteBuffer result = instance.get();

net.minecraft.client.sounds.ChunkedSampleByteBuf#size()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/ChunkedSampleByteBuf.java:50
  • Modifiers: public
  • Return: int

คืออะไร

ดำเนินการ size ตาม implementation ของ ChunkedSampleByteBuf

ทำงานยังไง

คืนค่า: this.byteCount.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

ChunkedSampleByteBuf instance = ...;
int result = instance.size();

FiniteAudioStream

  • Full name: net.minecraft.client.sounds.FiniteAudioStream
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/FiniteAudioStream.java
  • Type: interface
  • Modifiers: public
  • Implements: AudioStream

net.minecraft.client.sounds.FiniteAudioStream#readAll()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/FiniteAudioStream.java:10
  • Modifiers: ``
  • Return: ByteBuffer

คืออะไร

อ่าน All

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

Throws

  • IOException

ตัวอย่างใช้งาน

FiniteAudioStream instance = ...;
ByteBuffer result = instance.readAll();

FloatSampleSource

  • Full name: net.minecraft.client.sounds.FloatSampleSource
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/FloatSampleSource.java
  • Type: interface
  • Modifiers: public
  • Implements: FiniteAudioStream

net.minecraft.client.sounds.FloatSampleSource#read(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/FloatSampleSource.java:15
  • Modifiers: default
  • Return: ByteBuffer

คืออะไร

อ่าน read

ทำงานยังไง

มีการวนลูป. เรียกต่อ: readChunk(), size(), get(). สร้างออบเจ็กต์: ChunkedSampleByteBuf. คืนค่า: chunkedSampleByteBuf.get().

Parameters

  • int i

Throws

  • IOException

ตัวอย่างใช้งาน

FloatSampleSource instance = ...;
ByteBuffer result = instance.read(0);

net.minecraft.client.sounds.FloatSampleSource#readAll()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/FloatSampleSource.java:25
  • Modifiers: default
  • Return: ByteBuffer

คืออะไร

อ่าน All

ทำงานยังไง

มีการวนลูป. เรียกต่อ: readChunk(), get(). สร้างออบเจ็กต์: ChunkedSampleByteBuf. คืนค่า: chunkedSampleByteBuf.get().

Parameters

  • ไม่มี

Throws

  • IOException

ตัวอย่างใช้งาน

FloatSampleSource instance = ...;
ByteBuffer result = instance.readAll();

net.minecraft.client.sounds.FloatSampleSource#readChunk(FloatConsumer)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/FloatSampleSource.java:13
  • Modifiers: ``
  • Return: boolean

คืออะไร

อ่าน Chunk

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • FloatConsumer floatConsumer

Throws

  • IOException

ตัวอย่างใช้งาน

FloatSampleSource instance = ...;
FloatConsumer floatConsumer = ...;
boolean result = instance.readChunk(floatConsumer);

JOrbisAudioStream

  • Full name: net.minecraft.client.sounds.JOrbisAudioStream
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/JOrbisAudioStream.java
  • Type: class
  • Modifiers: public
  • Implements: FloatSampleSource

net.minecraft.client.sounds.JOrbisAudioStream#close()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/JOrbisAudioStream.java:228
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

Throws

  • IOException

ตัวอย่างใช้งาน

JOrbisAudioStream instance = ...;
instance.close();

net.minecraft.client.sounds.JOrbisAudioStream#getFormat()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/JOrbisAudioStream.java:73
  • Modifiers: public
  • Return: AudioFormat

คืออะไร

อ่านค่า Format

ทำงานยังไง

คืนค่า: this.audioFormat.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

JOrbisAudioStream instance = ...;
AudioFormat result = instance.getFormat();

net.minecraft.client.sounds.JOrbisAudioStream#JOrbisAudioStream(InputStream)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/JOrbisAudioStream.java:40
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ JOrbisAudioStream ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. แก้ state: input, audioFormat. เรียกต่อ: readPage(), readIdentificationPacket(), isError(), synthesis_headerin(), readPacket(), synthesis_init(), init(). สร้างออบเจ็กต์: Comment, IOException, AudioFormat.

Parameters

  • InputStream inputStream

Throws

  • IOException

ตัวอย่างใช้งาน

InputStream inputStream = ...;
JOrbisAudioStream instance = new JOrbisAudioStream(inputStream);

net.minecraft.client.sounds.JOrbisAudioStream#readChunk(FloatConsumer)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/JOrbisAudioStream.java:169
  • Modifiers: public
  • Return: boolean

คืออะไร

อ่าน Chunk

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; แยกกรณีด้วย switch ; มีการวนลูป. เรียกต่อ: readPacket(), isError(), synthesis(), synthesis_blockin(), synthesis_pcmout(), getSamplesToWrite(), copyMono(), copyStereo(). สร้างออบเจ็กต์: IOException. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • FloatConsumer floatConsumer

Throws

  • IOException

ตัวอย่างใช้งาน

JOrbisAudioStream instance = ...;
FloatConsumer floatConsumer = ...;
boolean result = instance.readChunk(floatConsumer);

LoopingAudioStream

  • Full name: net.minecraft.client.sounds.LoopingAudioStream
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/LoopingAudioStream.java
  • Type: class
  • Modifiers: public
  • Implements: AudioStream

net.minecraft.client.sounds.LoopingAudioStream#close()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/LoopingAudioStream.java:43
  • Modifiers: public
  • Return: void

คืออะไร

ปิด close

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 2 statement).

Parameters

  • ไม่มี

Throws

  • IOException

ตัวอย่างใช้งาน

LoopingAudioStream instance = ...;
instance.close();

net.minecraft.client.sounds.LoopingAudioStream#getFormat()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/LoopingAudioStream.java:25
  • Modifiers: public
  • Return: AudioFormat

คืออะไร

อ่านค่า Format

ทำงานยังไง

คืนค่า: this.stream.getFormat().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

LoopingAudioStream instance = ...;
AudioFormat result = instance.getFormat();

net.minecraft.client.sounds.LoopingAudioStream#LoopingAudioStream(LoopingAudioStream.AudioStreamProvider,InputStream)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/LoopingAudioStream.java:18
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ LoopingAudioStream ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: provider, bufferedInputStream, stream. เรียกต่อ: mark(), create(), NoCloseBuffer(). สร้างออบเจ็กต์: BufferedInputStream, LoopingAudioStream.NoCloseBuffer.

Parameters

  • LoopingAudioStream.AudioStreamProvider audioStreamProvider
  • InputStream inputStream

Throws

  • IOException

ตัวอย่างใช้งาน

LoopingAudioStream.AudioStreamProvider audioStreamProvider = ...;
InputStream inputStream = ...;
LoopingAudioStream instance = new LoopingAudioStream(audioStreamProvider, inputStream);

net.minecraft.client.sounds.LoopingAudioStream#read(int)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/LoopingAudioStream.java:30
  • Modifiers: public
  • Return: ByteBuffer

คืออะไร

อ่าน read

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: stream. เรียกต่อ: hasRemaining(), close(), reset(), create(), NoCloseBuffer(). สร้างออบเจ็กต์: LoopingAudioStream.NoCloseBuffer. คืนค่า: byteBuffer.

Parameters

  • int i

Throws

  • IOException

ตัวอย่างใช้งาน

LoopingAudioStream instance = ...;
ByteBuffer result = instance.read(0);

LoopingAudioStream$AudioStreamProvider

  • Full name: net.minecraft.client.sounds.LoopingAudioStream$AudioStreamProvider
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/LoopingAudioStream.java
  • Type: interface
  • Modifiers: public

net.minecraft.client.sounds.LoopingAudioStream$AudioStreamProvider#create(InputStream)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/LoopingAudioStream.java:52
  • Modifiers: ``
  • Return: AudioStream

คืออะไร

สร้าง create

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • InputStream inputStream

Throws

  • IOException

ตัวอย่างใช้งาน

LoopingAudioStream.AudioStreamProvider instance = ...;
InputStream inputStream = ...;
AudioStream result = instance.create(inputStream);

MusicInfo

  • Full name: net.minecraft.client.sounds.MusicInfo
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/MusicInfo.java
  • Type: record
  • Modifiers: public

net.minecraft.client.sounds.MusicInfo#canReplace(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicInfo.java:16
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบว่าสามารถ Replace

ทำงานยังไง

แก้ state: music. เรียกต่อ: replaceCurrentMusic(), getEvent(), value(), location(), equals(), getLocation().

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

MusicInfo instance = ...;
SoundInstance soundInstance = ...;
boolean result = instance.canReplace(soundInstance);

net.minecraft.client.sounds.MusicInfo#MusicInfo(Music)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicInfo.java:12
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MusicInfo ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Music music

ตัวอย่างใช้งาน

Music music = ...;
MusicInfo instance = new MusicInfo(music);

MusicManager

  • Full name: net.minecraft.client.sounds.MusicManager
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/MusicManager.java
  • Type: class
  • Modifiers: public

net.minecraft.client.sounds.MusicManager#isPlayingMusic(Music)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicManager.java:118
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Playing Music

ทำงานยังไง

แก้ state: currentMusic. เรียกต่อ: getEvent(), value(), location(), equals(), getLocation(). คืนค่า: this.currentMusic == null ? false : ((SoundEvent)music.getEvent().value()).location().equals(this.currentMusic.getLocation()).

Parameters

  • Music music

ตัวอย่างใช้งาน

MusicManager instance = ...;
Music music = ...;
boolean result = instance.isPlayingMusic(music);

net.minecraft.client.sounds.MusicManager#MusicManager(Minecraft)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicManager.java:24
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ MusicManager ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: minecraft.

Parameters

  • Minecraft minecraft

ตัวอย่างใช้งาน

Minecraft minecraft = ...;
MusicManager instance = new MusicManager(minecraft);

net.minecraft.client.sounds.MusicManager#startPlaying(MusicInfo)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicManager.java:61
  • Modifiers: public
  • Return: void

คืออะไร

เริ่ม Playing

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: currentMusic, nextSongDelay, currentGain. เรียกต่อ: forMusic(), music(), getEvent(), value(), getSound(), getSoundManager(), play(), setVolume().

Parameters

  • MusicInfo musicInfo

ตัวอย่างใช้งาน

MusicManager instance = ...;
MusicInfo musicInfo = ...;
instance.startPlaying(musicInfo);

net.minecraft.client.sounds.MusicManager#stopPlaying()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicManager.java:78
  • Modifiers: public
  • Return: void

คืออะไร

หยุด Playing

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: currentMusic, nextSongDelay. เรียกต่อ: getSoundManager(), stop().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MusicManager instance = ...;
instance.stopPlaying();

net.minecraft.client.sounds.MusicManager#stopPlaying(Music)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicManager.java:72
  • Modifiers: public
  • Return: void

คืออะไร

หยุด Playing

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isPlayingMusic().

Parameters

  • Music music

ตัวอย่างใช้งาน

MusicManager instance = ...;
Music music = ...;
instance.stopPlaying(music);

net.minecraft.client.sounds.MusicManager#tick()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/MusicManager.java:28
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: nextSongDelay, currentMusic. เรียกต่อ: getSituationalMusic(), volume(), fadePlaying(), music(), max(), canReplace(), getSoundManager(), stop().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

MusicManager instance = ...;
instance.tick();

SoundBufferLibrary

  • Full name: net.minecraft.client.sounds.SoundBufferLibrary
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/SoundBufferLibrary.java
  • Type: class
  • Modifiers: public

net.minecraft.client.sounds.SoundBufferLibrary#clear()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundBufferLibrary.java:53
  • Modifiers: public
  • Return: void

คืออะไร

ล้าง clear

ทำงานยังไง

เรียกต่อ: values(), forEach(), thenAccept().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundBufferLibrary instance = ...;
instance.clear();

net.minecraft.client.sounds.SoundBufferLibrary#getCompleteBuffer(ResourceLocation)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundBufferLibrary.java:28
  • Modifiers: public
  • Return: CompletableFuture<SoundBuffer>

คืออะไร

อ่านค่า Complete Buffer

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: computeIfAbsent(), supplyAsync(), open(), readAll(), getFormat(), nonCriticalIoPool(). สร้างออบเจ็กต์: JOrbisAudioStream, SoundBuffer, CompletionException. คืนค่า: new SoundBuffer(byteBuffer, finiteAudioStream.getFormat()).

Parameters

  • ResourceLocation resourceLocation

ตัวอย่างใช้งาน

SoundBufferLibrary instance = ...;
ResourceLocation resourceLocation = ...;
CompletableFuture<SoundBuffer> result = instance.getCompleteBuffer(resourceLocation);

net.minecraft.client.sounds.SoundBufferLibrary#getStream(ResourceLocation,boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundBufferLibrary.java:42
  • Modifiers: public
  • Return: CompletableFuture<AudioStream>

คืออะไร

อ่านค่า Stream

ทำงานยังไง

มีการจัดการ exception. เรียกต่อ: supplyAsync(), open(), nonCriticalIoPool(). สร้างออบเจ็กต์: LoopingAudioStream, JOrbisAudioStream, CompletionException. มีจุด return อย่างน้อย 2 จุด.

Parameters

  • ResourceLocation resourceLocation
  • boolean bl

ตัวอย่างใช้งาน

SoundBufferLibrary instance = ...;
ResourceLocation resourceLocation = ...;
CompletableFuture<AudioStream> result = instance.getStream(resourceLocation, true);

net.minecraft.client.sounds.SoundBufferLibrary#preload(Collection<Sound>)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundBufferLibrary.java:58
  • Modifiers: public
  • Return: CompletableFuture<?>

คืออะไร

ดำเนินการ preload ตาม implementation ของ SoundBufferLibrary

ทำงานยังไง

เรียกต่อ: allOf(), stream(), map(), getCompleteBuffer(), getPath(), toArray(). คืนค่า: CompletableFuture.allOf(collection.stream().map(sound -> this.getCompleteBuffer(sound.getPath())).toArray(CompletableFuture[]::new)).

Parameters

  • Collection<Sound> collection

ตัวอย่างใช้งาน

SoundBufferLibrary instance = ...;
Collection<Sound> collection = ...;
CompletableFuture<?> result = instance.preload(collection);

net.minecraft.client.sounds.SoundBufferLibrary#SoundBufferLibrary(ResourceProvider)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundBufferLibrary.java:24
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SoundBufferLibrary ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: resourceManager.

Parameters

  • ResourceProvider resourceProvider

ตัวอย่างใช้งาน

ResourceProvider resourceProvider = ...;
SoundBufferLibrary instance = new SoundBufferLibrary(resourceProvider);

SoundEngine

  • Full name: net.minecraft.client.sounds.SoundEngine
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/SoundEngine.java
  • Type: class
  • Modifiers: public

net.minecraft.client.sounds.SoundEngine#addEventListener(SoundEventListener)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:185
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Event Listener

ทำงานยังไง

เรียกต่อ: add().

Parameters

  • SoundEventListener soundEventListener

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundEventListener soundEventListener = ...;
instance.addEventListener(soundEventListener);

net.minecraft.client.sounds.SoundEngine#destroy()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:138
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ destroy ตาม implementation ของ SoundEngine

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. แก้ state: loaded. เรียกต่อ: stopAll(), clear(), cleanup().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.destroy();

net.minecraft.client.sounds.SoundEngine#emergencyShutdown()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:147
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ emergencyShutdown ตาม implementation ของ SoundEngine

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: cleanup().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.emergencyShutdown();

net.minecraft.client.sounds.SoundEngine#getAvailableSoundDevices()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:491
  • Modifiers: public
  • Return: List<String>

คืออะไร

อ่านค่า Available Sound Devices

ทำงานยังไง

คืนค่า: this.library.getAvailableSoundDevices().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
List<String> result = instance.getAvailableSoundDevices();

net.minecraft.client.sounds.SoundEngine#getDebugString()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:487
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Debug String

ทำงานยังไง

คืนค่า: this.library.getDebugString().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
String result = instance.getDebugString();

net.minecraft.client.sounds.SoundEngine#getListenerTransform()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:495
  • Modifiers: public
  • Return: ListenerTransform

คืออะไร

อ่านค่า Listener Transform

ทำงานยังไง

เรียกต่อ: getTransform(). คืนค่า: this.listener.getTransform().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
ListenerTransform result = instance.getListenerTransform();

net.minecraft.client.sounds.SoundEngine#isActive(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:325
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Active

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: containsKey(), get(). คืนค่า: false.

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundInstance soundInstance = ...;
boolean result = instance.isActive(soundInstance);

net.minecraft.client.sounds.SoundEngine#pause()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:446
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ pause ตาม implementation ของ SoundEngine

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: executeOnChannels(), forEach().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.pause();

net.minecraft.client.sounds.SoundEngine#play(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:335
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ play ตาม implementation ของ SoundEngine

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: canPlaySound(), resolve(), getLocation(), add(), warn(), getSound(), getVolume(), max(). สร้างออบเจ็กต์: Vec3.

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundInstance soundInstance = ...;
instance.play(soundInstance);

net.minecraft.client.sounds.SoundEngine#playDelayed(SoundInstance,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:458
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playDelayed ตาม implementation ของ SoundEngine

ทำงานยังไง

เรียกต่อ: put().

Parameters

  • SoundInstance soundInstance
  • int i

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundInstance soundInstance = ...;
instance.playDelayed(soundInstance, 0);

net.minecraft.client.sounds.SoundEngine#queueTickingSound(TickableSoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:426
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ queueTickingSound ตาม implementation ของ SoundEngine

ทำงานยังไง

เรียกต่อ: add().

Parameters

  • TickableSoundInstance tickableSoundInstance

ตัวอย่างใช้งาน

SoundEngine instance = ...;
TickableSoundInstance tickableSoundInstance = ...;
instance.queueTickingSound(tickableSoundInstance);

net.minecraft.client.sounds.SoundEngine#reload()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:82
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ reload ตาม implementation ของ SoundEngine

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: clear(), location(), getSoundEvent(), warn(), getKey(), add(), destroy(), loadLibrary().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.reload();

net.minecraft.client.sounds.SoundEngine#removeEventListener(SoundEventListener)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:189
  • Modifiers: public
  • Return: void

คืออะไร

ลบ Event Listener

ทำงานยังไง

เรียกต่อ: remove().

Parameters

  • SoundEventListener soundEventListener

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundEventListener soundEventListener = ...;
instance.removeEventListener(soundEventListener);

net.minecraft.client.sounds.SoundEngine#requestPreload(Sound)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:430
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ requestPreload ตาม implementation ของ SoundEngine

ทำงานยังไง

เรียกต่อ: add().

Parameters

  • Sound sound

ตัวอย่างใช้งาน

SoundEngine instance = ...;
Sound sound = ...;
instance.requestPreload(sound);

net.minecraft.client.sounds.SoundEngine#resume()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:452
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ resume ตาม implementation ของ SoundEngine

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: executeOnChannels(), forEach().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.resume();

net.minecraft.client.sounds.SoundEngine#setVolume(SoundInstance,float)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:162
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Volume

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), execute(), calculateVolume().

Parameters

  • SoundInstance soundInstance
  • float f

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundInstance soundInstance = ...;
instance.setVolume(soundInstance, 0.0F);

net.minecraft.client.sounds.SoundEngine#SoundEngine(SoundManager,Options,ResourceProvider)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:76
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SoundEngine ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: soundManager, options, soundBuffers. สร้างออบเจ็กต์: SoundBufferLibrary.

Parameters

  • SoundManager soundManager
  • Options options
  • ResourceProvider resourceProvider

ตัวอย่างใช้งาน

SoundManager soundManager = ...;
Options options = ...;
ResourceProvider resourceProvider = ...;
SoundEngine instance = new SoundEngine(soundManager, options, resourceProvider);

net.minecraft.client.sounds.SoundEngine#stop(ResourceLocation,SoundSource)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:469
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: get(), getLocation(), equals(), stopAll(), keySet().

Parameters

  • ResourceLocation resourceLocation
  • SoundSource soundSource

ตัวอย่างใช้งาน

SoundEngine instance = ...;
ResourceLocation resourceLocation = ...;
SoundSource soundSource = ...;
instance.stop(resourceLocation, soundSource);

net.minecraft.client.sounds.SoundEngine#stop(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:153
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: get(), execute().

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundInstance soundInstance = ...;
instance.stop(soundInstance);

net.minecraft.client.sounds.SoundEngine#stopAll()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:171
  • Modifiers: public
  • Return: void

คืออะไร

หยุด All

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: flush(), values(), forEach(), execute(), clear().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.stopAll();

net.minecraft.client.sounds.SoundEngine#tick(boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:224
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: shouldChangeDevice(), reload(), tickNonPaused(), scheduleTick().

Parameters

  • boolean bl

ตัวอย่างใช้งาน

SoundEngine instance = ...;
instance.tick(true);

net.minecraft.client.sounds.SoundEngine#updateCategoryVolume(SoundSource,float)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:119
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Category Volume

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: setGain(), forEach(), calculateVolume(), execute(), stop(), setVolume().

Parameters

  • SoundSource soundSource
  • float f

ตัวอย่างใช้งาน

SoundEngine instance = ...;
SoundSource soundSource = ...;
instance.updateCategoryVolume(soundSource, 0.0F);

net.minecraft.client.sounds.SoundEngine#updateSource(Camera)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngine.java:462
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Source

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: isInitialized(), getPosition(), getLookVector(), getUpVector(), execute(), setTransform(). สร้างออบเจ็กต์: ListenerTransform, Vec3.

Parameters

  • Camera camera

ตัวอย่างใช้งาน

SoundEngine instance = ...;
Camera camera = ...;
instance.updateSource(camera);

SoundEngineExecutor

  • Full name: net.minecraft.client.sounds.SoundEngineExecutor
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/SoundEngineExecutor.java
  • Type: class
  • Modifiers: public
  • Extends: BlockableEventLoop<Runnable>

net.minecraft.client.sounds.SoundEngineExecutor#flush()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngineExecutor.java:47
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ flush ตาม implementation ของ SoundEngineExecutor

ทำงานยังไง

มีการจัดการ exception. แก้ state: shutdown, thread. เรียกต่อ: interrupt(), join(), currentThread(), dropAllTasks(), createThread().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngineExecutor instance = ...;
instance.flush();

net.minecraft.client.sounds.SoundEngineExecutor#getRunningThread()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngineExecutor.java:33
  • Modifiers: protected
  • Return: Thread

คืออะไร

อ่านค่า Running Thread

ทำงานยังไง

คืนค่า: this.thread.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected Thread getRunningThread() {
    return super.getRunningThread();
}

net.minecraft.client.sounds.SoundEngineExecutor#shouldRun(Runnable)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngineExecutor.java:29
  • Modifiers: protected
  • Return: boolean

คืออะไร

ตรวจสอบว่าควร Run

ทำงานยังไง

คืนค่า: !this.shutdown.

Parameters

  • Runnable runnable

ตัวอย่างใช้งาน

Runnable runnable = ...;
@Override
protected boolean shouldRun(Runnable runnable) {
    return super.shouldRun(runnable);
}

net.minecraft.client.sounds.SoundEngineExecutor#SoundEngineExecutor()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngineExecutor.java:13
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SoundEngineExecutor ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundEngineExecutor instance = new SoundEngineExecutor();

net.minecraft.client.sounds.SoundEngineExecutor#waitForTasks()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngineExecutor.java:43
  • Modifiers: protected
  • Return: void

คืออะไร

ดำเนินการ waitForTasks ตาม implementation ของ SoundEngineExecutor

ทำงานยังไง

มีการวนลูป. เรียกต่อ: park().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

@Override
protected void waitForTasks() {
    super.waitForTasks();
}

net.minecraft.client.sounds.SoundEngineExecutor#wrapRunnable(Runnable)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEngineExecutor.java:25
  • Modifiers: public
  • Return: Runnable

คืออะไร

ดำเนินการ wrapRunnable ตาม implementation ของ SoundEngineExecutor

ทำงานยังไง

คืนค่า: runnable.

Parameters

  • Runnable runnable

ตัวอย่างใช้งาน

SoundEngineExecutor instance = ...;
Runnable runnable = ...;
Runnable result = instance.wrapRunnable(runnable);

SoundEventListener

  • Full name: net.minecraft.client.sounds.SoundEventListener
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/SoundEventListener.java
  • Type: interface
  • Modifiers: public

net.minecraft.client.sounds.SoundEventListener#onPlaySound(SoundInstance,WeighedSoundEvents,float)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundEventListener.java:9
  • Modifiers: ``
  • Return: void

คืออะไร

จัดการเหตุการณ์ Play Sound

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • SoundInstance soundInstance
  • WeighedSoundEvents weighedSoundEvents
  • float f

ตัวอย่างใช้งาน

SoundEventListener instance = ...;
SoundInstance soundInstance = ...;
WeighedSoundEvents weighedSoundEvents = ...;
instance.onPlaySound(soundInstance, weighedSoundEvents, 0.0F);

SoundManager

  • Full name: net.minecraft.client.sounds.SoundManager
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/SoundManager.java
  • Type: class
  • Modifiers: public
  • Extends: SimplePreparableReloadListener<SoundManager.Preparations>

net.minecraft.client.sounds.SoundManager#addListener(SoundEventListener)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:248
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Listener

ทำงานยังไง

เรียกต่อ: addEventListener().

Parameters

  • SoundEventListener soundEventListener

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundEventListener soundEventListener = ...;
instance.addListener(soundEventListener);

net.minecraft.client.sounds.SoundManager#apply(SoundManager.Preparations,ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:139
  • Modifiers: protected
  • Return: void

คืออะไร

นำไปใช้ apply

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: keySet(), get(), isTranslationResolvable(), getSubtitle(), containsKey(), error(), isDebugEnabled(), debug().

Parameters

  • SoundManager.Preparations preparations
  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

ตัวอย่างใช้งาน

SoundManager.Preparations preparations = ...;
ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected void apply(SoundManager.Preparations preparations, ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    super.apply(preparations, resourceManager, profilerFiller);
}

net.minecraft.client.sounds.SoundManager#destroy()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:212
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ destroy ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.destroy();

net.minecraft.client.sounds.SoundManager#emergencyShutdown()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:216
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ emergencyShutdown ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.emergencyShutdown();

net.minecraft.client.sounds.SoundManager#getAvailableSoundDevices()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:161
  • Modifiers: public
  • Return: List<String>

คืออะไร

อ่านค่า Available Sound Devices

ทำงานยังไง

คืนค่า: this.soundEngine.getAvailableSoundDevices().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
List<String> result = instance.getAvailableSoundDevices();

net.minecraft.client.sounds.SoundManager#getAvailableSounds()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:184
  • Modifiers: public
  • Return: Collection<ResourceLocation>

คืออะไร

อ่านค่า Available Sounds

ทำงานยังไง

เรียกต่อ: keySet(). คืนค่า: this.registry.keySet().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
Collection<ResourceLocation> result = instance.getAvailableSounds();

net.minecraft.client.sounds.SoundManager#getDebugString()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:260
  • Modifiers: public
  • Return: String

คืออะไร

อ่านค่า Debug String

ทำงานยังไง

คืนค่า: this.soundEngine.getDebugString().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
String result = instance.getDebugString();

net.minecraft.client.sounds.SoundManager#getListenerTransform()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:165
  • Modifiers: public
  • Return: ListenerTransform

คืออะไร

อ่านค่า Listener Transform

ทำงานยังไง

คืนค่า: this.soundEngine.getListenerTransform().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
ListenerTransform result = instance.getListenerTransform();

net.minecraft.client.sounds.SoundManager#getSoundEvent(ResourceLocation)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:179
  • Modifiers: public
  • Return: WeighedSoundEvents

คืออะไร

อ่านค่า Sound Event

ทำงานยังไง

เรียกต่อ: get(). คืนค่า: this.registry.get(resourceLocation).

Parameters

  • ResourceLocation resourceLocation

ตัวอย่างใช้งาน

SoundManager instance = ...;
ResourceLocation resourceLocation = ...;
WeighedSoundEvents result = instance.getSoundEvent(resourceLocation);

net.minecraft.client.sounds.SoundManager#isActive(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:244
  • Modifiers: public
  • Return: boolean

คืออะไร

ตรวจสอบสถานะ Active

ทำงานยังไง

คืนค่า: this.soundEngine.isActive(soundInstance).

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundInstance soundInstance = ...;
boolean result = instance.isActive(soundInstance);

net.minecraft.client.sounds.SoundManager#pause()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:204
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ pause ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.pause();

net.minecraft.client.sounds.SoundManager#play(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:192
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ play ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundInstance soundInstance = ...;
instance.play(soundInstance);

net.minecraft.client.sounds.SoundManager#playDelayed(SoundInstance,int)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:196
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ playDelayed ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • SoundInstance soundInstance
  • int i

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundInstance soundInstance = ...;
instance.playDelayed(soundInstance, 0);

net.minecraft.client.sounds.SoundManager#prepare(ResourceManager,ProfilerFiller)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:71
  • Modifiers: protected
  • Return: SoundManager.Preparations

คืออะไร

ดำเนินการ prepare ตาม implementation ของ SoundManager

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป ; มีการจัดการ exception. เรียกต่อ: Preparations(), zone(), listResources(), close(), addSuppressed(), getNamespaces(), getResourceStack(), fromNamespaceAndPath(). สร้างออบเจ็กต์: SoundManager.Preparations. คืนค่า: preparations.

Parameters

  • ResourceManager resourceManager
  • ProfilerFiller profilerFiller

ตัวอย่างใช้งาน

ResourceManager resourceManager = ...;
ProfilerFiller profilerFiller = ...;
@Override
protected SoundManager.Preparations prepare(ResourceManager resourceManager, ProfilerFiller profilerFiller) {
    return super.prepare(resourceManager, profilerFiller);
}

net.minecraft.client.sounds.SoundManager#queueTickingSound(TickableSoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:188
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ queueTickingSound ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • TickableSoundInstance tickableSoundInstance

ตัวอย่างใช้งาน

SoundManager instance = ...;
TickableSoundInstance tickableSoundInstance = ...;
instance.queueTickingSound(tickableSoundInstance);

net.minecraft.client.sounds.SoundManager#reload()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:264
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ reload ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.reload();

net.minecraft.client.sounds.SoundManager#removeListener(SoundEventListener)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:252
  • Modifiers: public
  • Return: void

คืออะไร

ลบ Listener

ทำงานยังไง

เรียกต่อ: removeEventListener().

Parameters

  • SoundEventListener soundEventListener

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundEventListener soundEventListener = ...;
instance.removeListener(soundEventListener);

net.minecraft.client.sounds.SoundManager#resume()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:224
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ resume ตาม implementation ของ SoundManager

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.resume();

net.minecraft.client.sounds.SoundManager#setVolume(SoundInstance,float)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:240
  • Modifiers: public
  • Return: void

คืออะไร

กำหนดค่า Volume

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • SoundInstance soundInstance
  • float f

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundInstance soundInstance = ...;
instance.setVolume(soundInstance, 0.0F);

net.minecraft.client.sounds.SoundManager#SoundManager(Options)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:67
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ SoundManager ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: soundEngine. เรียกต่อ: fromMap(). สร้างออบเจ็กต์: SoundEngine.

Parameters

  • Options options

ตัวอย่างใช้งาน

Options options = ...;
SoundManager instance = new SoundManager(options);

net.minecraft.client.sounds.SoundManager#stop()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:208
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

เรียกต่อ: stopAll().

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.stop();

net.minecraft.client.sounds.SoundManager#stop(ResourceLocation,SoundSource)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:256
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • ResourceLocation resourceLocation
  • SoundSource soundSource

ตัวอย่างใช้งาน

SoundManager instance = ...;
ResourceLocation resourceLocation = ...;
SoundSource soundSource = ...;
instance.stop(resourceLocation, soundSource);

net.minecraft.client.sounds.SoundManager#stop(SoundInstance)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:236
  • Modifiers: public
  • Return: void

คืออะไร

หยุด stop

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • SoundInstance soundInstance

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundInstance soundInstance = ...;
instance.stop(soundInstance);

net.minecraft.client.sounds.SoundManager#tick(boolean)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:220
  • Modifiers: public
  • Return: void

คืออะไร

ประมวลผล tick tick

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • boolean bl

ตัวอย่างใช้งาน

SoundManager instance = ...;
instance.tick(true);

net.minecraft.client.sounds.SoundManager#updateSource(Camera)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:200
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Source

ทำงานยังไง

ทำงานตาม body โดยตรง (ประมาณ 1 statement).

Parameters

  • Camera camera

ตัวอย่างใช้งาน

SoundManager instance = ...;
Camera camera = ...;
instance.updateSource(camera);

net.minecraft.client.sounds.SoundManager#updateSourceVolume(SoundSource,float)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:228
  • Modifiers: public
  • Return: void

คืออะไร

อัปเดต Source Volume

ทำงานยังไง

ตรวจเงื่อนไขด้วย if. เรียกต่อ: stop(), updateCategoryVolume().

Parameters

  • SoundSource soundSource
  • float f

ตัวอย่างใช้งาน

SoundManager instance = ...;
SoundSource soundSource = ...;
instance.updateSourceVolume(soundSource, 0.0F);

SoundManager$Preparations

  • Full name: net.minecraft.client.sounds.SoundManager$Preparations
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/SoundManager.java
  • Type: class
  • Modifiers: protected static

net.minecraft.client.sounds.SoundManager$Preparations#apply(Map<ResourceLocation, WeighedSoundEvents>,Map<ResourceLocation, Resource>,SoundEngine)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/SoundManager.java:346
  • Modifiers: public
  • Return: void

คืออะไร

นำไปใช้ apply

ทำงานยังไง

มีการวนลูป. เรียกต่อ: clear(), putAll(), entrySet(), put(), getKey(), getValue(), preloadIfRequired().

Parameters

  • Map<ResourceLocation, WeighedSoundEvents> map
  • Map<ResourceLocation, Resource> map2
  • SoundEngine soundEngine

ตัวอย่างใช้งาน

SoundManager.Preparations instance = ...;
Map<ResourceLocation, WeighedSoundEvents> map = ...;
Map<ResourceLocation, Resource> map2 = ...;
SoundEngine soundEngine = ...;
instance.apply(map, map2, soundEngine);

WeighedSoundEvents

  • Full name: net.minecraft.client.sounds.WeighedSoundEvents
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/WeighedSoundEvents.java
  • Type: class
  • Modifiers: public
  • Implements: Weighted<Sound>

net.minecraft.client.sounds.WeighedSoundEvents#addSound(Weighted<Sound>)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/WeighedSoundEvents.java:52
  • Modifiers: public
  • Return: void

คืออะไร

เพิ่ม Sound

ทำงานยังไง

เรียกต่อ: add().

Parameters

  • Weighted<Sound> weighted

ตัวอย่างใช้งาน

WeighedSoundEvents instance = ...;
Weighted<Sound> weighted = ...;
instance.addSound(weighted);

net.minecraft.client.sounds.WeighedSoundEvents#getSound(RandomSource)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/WeighedSoundEvents.java:34
  • Modifiers: public
  • Return: Sound

คืออะไร

อ่านค่า Sound

ทำงานยังไง

ตรวจเงื่อนไขด้วย if ; มีการวนลูป. เรียกต่อ: getWeight(), isEmpty(), nextInt(). มีจุด return อย่างน้อย 3 จุด.

Parameters

  • RandomSource randomSource

ตัวอย่างใช้งาน

WeighedSoundEvents instance = ...;
RandomSource randomSource = ...;
Sound result = instance.getSound(randomSource);

net.minecraft.client.sounds.WeighedSoundEvents#getSubtitle()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/WeighedSoundEvents.java:56
  • Modifiers: public
  • Return: Component

คืออะไร

อ่านค่า Subtitle

ทำงานยังไง

คืนค่า: this.subtitle.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WeighedSoundEvents instance = ...;
Component result = instance.getSubtitle();

net.minecraft.client.sounds.WeighedSoundEvents#getWeight()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/WeighedSoundEvents.java:23
  • Modifiers: public
  • Return: int

คืออะไร

อ่านค่า Weight

ทำงานยังไง

มีการวนลูป. คืนค่า: i.

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

WeighedSoundEvents instance = ...;
int result = instance.getWeight();

net.minecraft.client.sounds.WeighedSoundEvents#preloadIfRequired(SoundEngine)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/WeighedSoundEvents.java:61
  • Modifiers: public
  • Return: void

คืออะไร

ดำเนินการ preloadIfRequired ตาม implementation ของ WeighedSoundEvents

ทำงานยังไง

มีการวนลูป.

Parameters

  • SoundEngine soundEngine

ตัวอย่างใช้งาน

WeighedSoundEvents instance = ...;
SoundEngine soundEngine = ...;
instance.preloadIfRequired(soundEngine);

net.minecraft.client.sounds.WeighedSoundEvents#WeighedSoundEvents(ResourceLocation,String)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/WeighedSoundEvents.java:19
  • Modifiers: public
  • Kind: constructor

คืออะไร

สร้างออบเจ็กต์ WeighedSoundEvents ด้วยพารามิเตอร์ที่ระบุ

ทำงานยังไง

แก้ state: subtitle. เรียกต่อ: translatable().

Parameters

  • ResourceLocation resourceLocation
  • String string

ตัวอย่างใช้งาน

ResourceLocation resourceLocation = ...;
WeighedSoundEvents instance = new WeighedSoundEvents(resourceLocation, "value");

Weighted

  • Full name: net.minecraft.client.sounds.Weighted
  • Package: net.minecraft.client.sounds
  • Source: clientOnlynet/minecraft/client/sounds/Weighted.java
  • Type: interface
  • Modifiers: public

net.minecraft.client.sounds.Weighted#getSound(RandomSource)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/Weighted.java:11
  • Modifiers: ``
  • Return: T

คืออะไร

อ่านค่า Sound

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • RandomSource randomSource

ตัวอย่างใช้งาน

Weighted instance = ...;
RandomSource randomSource = ...;
T result = instance.getSound(randomSource);

net.minecraft.client.sounds.Weighted#getWeight()

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/Weighted.java:9
  • Modifiers: ``
  • Return: int

คืออะไร

อ่านค่า Weight

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • ไม่มี

ตัวอย่างใช้งาน

Weighted instance = ...;
int result = instance.getWeight();

net.minecraft.client.sounds.Weighted#preloadIfRequired(SoundEngine)

  • Origin: clientOnly
  • Source: net/minecraft/client/sounds/Weighted.java:13
  • Modifiers: ``
  • Return: void

คืออะไร

ดำเนินการ preloadIfRequired ตาม implementation ของ Weighted

ทำงานยังไง

ไม่มี body ใน source declaration นี้

Parameters

  • SoundEngine soundEngine

ตัวอย่างใช้งาน

Weighted instance = ...;
SoundEngine soundEngine = ...;
instance.preloadIfRequired(soundEngine);