当前位置: 首页>>代码示例>>Java>>正文


Java SoundCategory.MASTER属性代码示例

本文整理汇总了Java中net.minecraft.client.audio.SoundCategory.MASTER属性的典型用法代码示例。如果您正苦于以下问题:Java SoundCategory.MASTER属性的具体用法?Java SoundCategory.MASTER怎么用?Java SoundCategory.MASTER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraft.client.audio.SoundCategory的用法示例。


在下文中一共展示了SoundCategory.MASTER属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initGui

/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    int i = 0;
    this.field_146507_a = I18n.format("options.sounds.title", new Object[0]);
    this.field_146508_h = I18n.format("options.off", new Object[0]);
    this.buttonList.add(new GuiScreenOptionsSounds.Button(SoundCategory.MASTER.getCategoryId(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), SoundCategory.MASTER, true));
    i = i + 2;

    for (SoundCategory soundcategory : SoundCategory.values())
    {
        if (soundcategory != SoundCategory.MASTER)
        {
            this.buttonList.add(new GuiScreenOptionsSounds.Button(soundcategory.getCategoryId(), this.width / 2 - 155 + i % 2 * 160, this.height / 6 - 12 + 24 * (i >> 1), soundcategory, false));
            ++i;
        }
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:23,代码来源:GuiScreenOptionsSounds.java

示例2: mouseReleased

public void mouseReleased(int mouseX, int mouseY)
{
    if (this.field_146155_p)
    {
        if (this.field_146153_r == SoundCategory.MASTER)
        {
            float f = 1.0F;
        }
        else
        {
            GuiScreenOptionsSounds.this.game_settings_4.getSoundLevel(this.field_146153_r);
        }

        GuiScreenOptionsSounds.this.mc.getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
    }

    this.field_146155_p = false;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:18,代码来源:GuiScreenOptionsSounds.java

示例3: initGui

/**
 * Adds the buttons (and other controls) to the screen in question.
 */
public void initGui()
{
    byte var1 = 0;
    this.field_146507_a = I18n.format("options.sounds.title", new Object[0]);
    this.field_146508_h = I18n.format("options.off", new Object[0]);
    this.buttonList.add(new GuiScreenOptionsSounds.Button(SoundCategory.MASTER.getCategoryId(), this.width / 2 - 155 + var1 % 2 * 160, this.height / 6 - 12 + 24 * (var1 >> 1), SoundCategory.MASTER, true));
    int var6 = var1 + 2;
    SoundCategory[] var2 = SoundCategory.values();
    int var3 = var2.length;

    for (int var4 = 0; var4 < var3; ++var4)
    {
        SoundCategory var5 = var2[var4];

        if (var5 != SoundCategory.MASTER)
        {
            this.buttonList.add(new GuiScreenOptionsSounds.Button(var5.getCategoryId(), this.width / 2 - 155 + var6 % 2 * 160, this.height / 6 - 12 + 24 * (var6 >> 1), var5, false));
            ++var6;
        }
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:GuiScreenOptionsSounds.java

示例4: mouseReleased

public void mouseReleased(int p_146118_1_, int p_146118_2_)
{
    if (this.field_146155_p)
    {
        if (this.field_146153_r == SoundCategory.MASTER)
        {
            float var10000 = 1.0F;
        }
        else
        {
            GuiScreenOptionsSounds.this.field_146506_g.getSoundLevel(this.field_146153_r);
        }

        GuiScreenOptionsSounds.this.mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
    }

    this.field_146155_p = false;
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:18,代码来源:GuiScreenOptionsSounds.java

示例5: initGui

public void initGui()
{
    byte b0 = 0;
    this.field_146507_a = I18n.format("options.sounds.title", new Object[0]);
    this.field_146508_h = I18n.format("options.off", new Object[0]);
    this.buttonList.add(new GuiScreenOptionsSounds.Button(SoundCategory.MASTER.getCategoryId(), this.width / 2 - 155 + b0 % 2 * 160, this.height / 6 - 12 + 24 * (b0 >> 1), SoundCategory.MASTER, true));
    int k = b0 + 2;
    SoundCategory[] asoundcategory = SoundCategory.values();
    int i = asoundcategory.length;

    for (int j = 0; j < i; ++j)
    {
        SoundCategory soundcategory = asoundcategory[j];

        if (soundcategory != SoundCategory.MASTER)
        {
            this.buttonList.add(new GuiScreenOptionsSounds.Button(soundcategory.getCategoryId(), this.width / 2 - 155 + k % 2 * 160, this.height / 6 - 12 + 24 * (k >> 1), soundcategory, false));
            ++k;
        }
    }

    this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.format("gui.done", new Object[0])));
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:23,代码来源:GuiScreenOptionsSounds.java

示例6: mouseReleased

public void mouseReleased(int p_146118_1_, int p_146118_2_)
{
    if (this.field_146155_p)
    {
        if (this.field_146153_r == SoundCategory.MASTER)
        {
            float f = 1.0F;
        }
        else
        {
            GuiScreenOptionsSounds.this.field_146506_g.getSoundLevel(this.field_146153_r);
        }

        GuiScreenOptionsSounds.this.mc.getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(new ResourceLocation("gui.button.press"), 1.0F));
    }

    this.field_146155_p = false;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:18,代码来源:GuiScreenOptionsSounds.java


注:本文中的net.minecraft.client.audio.SoundCategory.MASTER属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。