BeeFlyingSoundInstance.java

net.minecraft.client.resources.sounds.BeeFlyingSoundInstance

信息

  • 全限定名:net.minecraft.client.resources.sounds.BeeFlyingSoundInstance
  • 类型:public class
  • 包:net.minecraft.client.resources.sounds
  • 源码路径:src/main/java/net/minecraft/client/resources/sounds/BeeFlyingSoundInstance.java
  • 起始行号:L10
  • 继承:BeeSoundInstance
  • 职责:

    TODO

字段/常量

内部类/嵌套类型

构造器

public BeeFlyingSoundInstance(Bee bee) @ L11

  • 构造器名:BeeFlyingSoundInstance
  • 源码定位:L11
  • 修饰符:public

参数:

  • bee: Bee

说明:

TODO

方法

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

protected AbstractTickableSoundInstance getAlternativeSoundInstance() @ L15

  • 方法名:getAlternativeSoundInstance
  • 源码定位:L15
  • 返回类型:AbstractTickableSoundInstance
  • 修饰符:protected

参数:

说明:

TODO

protected boolean shouldSwitchSounds() @ L20

  • 方法名:shouldSwitchSounds
  • 源码定位:L20
  • 返回类型:boolean
  • 修饰符:protected

参数:

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class BeeFlyingSoundInstance extends BeeSoundInstance {
    public BeeFlyingSoundInstance(Bee bee) {
        super(bee, SoundEvents.BEE_LOOP, SoundSource.NEUTRAL);
    }
 
    @Override
    protected AbstractTickableSoundInstance getAlternativeSoundInstance() {
        return new BeeAggressiveSoundInstance(this.bee);
    }
 
    @Override
    protected boolean shouldSwitchSounds() {
        return this.bee.isAngry();
    }
}

引用的其他类