SoundInstance.java

net.minecraft.client.resources.sounds.SoundInstance

信息

  • 全限定名:net.minecraft.client.resources.sounds.SoundInstance
  • 类型:public interface
  • 包:net.minecraft.client.resources.sounds
  • 源码路径:src/main/java/net/minecraft/client/resources/sounds/SoundInstance.java
  • 起始行号:L13
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

  • net.minecraft.client.resources.sounds.SoundInstance.Attenuation
    • 类型: enum
    • 修饰符: public static
    • 源码定位: L53
    • 说明:

      TODO

构造器

方法

下面的方法块按源码顺序生成。

Identifier getIdentifier() @ L14

  • 方法名:getIdentifier
  • 源码定位:L14
  • 返回类型:Identifier
  • 修饰符:package-private

参数:

说明:

TODO

WeighedSoundEvents resolve(SoundManager soundManager) @ L16

  • 方法名:resolve
  • 源码定位:L16
  • 返回类型:WeighedSoundEvents
  • 修饰符:package-private

参数:

  • soundManager: SoundManager

说明:

TODO

Sound getSound() @ L18

  • 方法名:getSound
  • 源码定位:L18
  • 返回类型:Sound
  • 修饰符:package-private

参数:

说明:

TODO

SoundSource getSource() @ L20

  • 方法名:getSource
  • 源码定位:L20
  • 返回类型:SoundSource
  • 修饰符:package-private

参数:

说明:

TODO

boolean isLooping() @ L22

  • 方法名:isLooping
  • 源码定位:L22
  • 返回类型:boolean
  • 修饰符:package-private

参数:

说明:

TODO

boolean isRelative() @ L24

  • 方法名:isRelative
  • 源码定位:L24
  • 返回类型:boolean
  • 修饰符:package-private

参数:

说明:

TODO

int getDelay() @ L26

  • 方法名:getDelay
  • 源码定位:L26
  • 返回类型:int
  • 修饰符:package-private

参数:

说明:

TODO

float getVolume() @ L28

  • 方法名:getVolume
  • 源码定位:L28
  • 返回类型:float
  • 修饰符:package-private

参数:

说明:

TODO

float getPitch() @ L30

  • 方法名:getPitch
  • 源码定位:L30
  • 返回类型:float
  • 修饰符:package-private

参数:

说明:

TODO

double getX() @ L32

  • 方法名:getX
  • 源码定位:L32
  • 返回类型:double
  • 修饰符:package-private

参数:

说明:

TODO

double getY() @ L34

  • 方法名:getY
  • 源码定位:L34
  • 返回类型:double
  • 修饰符:package-private

参数:

说明:

TODO

double getZ() @ L36

  • 方法名:getZ
  • 源码定位:L36
  • 返回类型:double
  • 修饰符:package-private

参数:

说明:

TODO

SoundInstance.Attenuation getAttenuation() @ L38

  • 方法名:getAttenuation
  • 源码定位:L38
  • 返回类型:SoundInstance.Attenuation
  • 修饰符:package-private

参数:

说明:

TODO

default boolean canStartSilent() @ L40

  • 方法名:canStartSilent
  • 源码定位:L40
  • 返回类型:boolean
  • 修饰符:default

参数:

说明:

TODO

default boolean canPlaySound() @ L44

  • 方法名:canPlaySound
  • 源码定位:L44
  • 返回类型:boolean
  • 修饰符:default

参数:

说明:

TODO

static RandomSource createUnseededRandom() @ L48

  • 方法名:createUnseededRandom
  • 源码定位:L48
  • 返回类型:RandomSource
  • 修饰符:static

参数:

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public interface SoundInstance {
    Identifier getIdentifier();
 
    @Nullable WeighedSoundEvents resolve(SoundManager soundManager);
 
    @Nullable Sound getSound();
 
    SoundSource getSource();
 
    boolean isLooping();
 
    boolean isRelative();
 
    int getDelay();
 
    float getVolume();
 
    float getPitch();
 
    double getX();
 
    double getY();
 
    double getZ();
 
    SoundInstance.Attenuation getAttenuation();
 
    default boolean canStartSilent() {
        return false;
    }
 
    default boolean canPlaySound() {
        return true;
    }
 
    static RandomSource createUnseededRandom() {
        return RandomSource.create();
    }
 
    @OnlyIn(Dist.CLIENT)
    public static enum Attenuation {
        NONE,
        LINEAR;
    }
}

引用的其他类