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


Java TileEntityBeacon.effectsList方法代码示例

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


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

示例1: updateScreen

import net.minecraft.tileentity.TileEntityBeacon; //导入方法依赖的package包/类
/**
 * Called from the main game loop to update the screen.
 */
public void updateScreen()
{
    super.updateScreen();
    int i = this.tileBeacon.getField(0);
    int j = this.tileBeacon.getField(1);
    int k = this.tileBeacon.getField(2);

    if (this.buttonsNotDrawn && i >= 0)
    {
        this.buttonsNotDrawn = false;

        for (int l = 0; l <= 2; ++l)
        {
            int i1 = TileEntityBeacon.effectsList[l].length;
            int j1 = i1 * 22 + (i1 - 1) * 2;

            for (int k1 = 0; k1 < i1; ++k1)
            {
                int l1 = TileEntityBeacon.effectsList[l][k1].id;
                GuiBeacon.PowerButton guibeacon$powerbutton = new GuiBeacon.PowerButton(l << 8 | l1, this.guiLeft + 76 + k1 * 24 - j1 / 2, this.guiTop + 22 + l * 25, l1, l);
                this.buttonList.add(guibeacon$powerbutton);

                if (l >= i)
                {
                    guibeacon$powerbutton.enabled = false;
                }
                else if (l1 == j)
                {
                    guibeacon$powerbutton.func_146140_b(true);
                }
            }
        }

        int i2 = 3;
        int j2 = TileEntityBeacon.effectsList[i2].length + 1;
        int k2 = j2 * 22 + (j2 - 1) * 2;

        for (int l2 = 0; l2 < j2 - 1; ++l2)
        {
            int i3 = TileEntityBeacon.effectsList[i2][l2].id;
            GuiBeacon.PowerButton guibeacon$powerbutton2 = new GuiBeacon.PowerButton(i2 << 8 | i3, this.guiLeft + 167 + l2 * 24 - k2 / 2, this.guiTop + 47, i3, i2);
            this.buttonList.add(guibeacon$powerbutton2);

            if (i2 >= i)
            {
                guibeacon$powerbutton2.enabled = false;
            }
            else if (i3 == k)
            {
                guibeacon$powerbutton2.func_146140_b(true);
            }
        }

        if (j > 0)
        {
            GuiBeacon.PowerButton guibeacon$powerbutton1 = new GuiBeacon.PowerButton(i2 << 8 | j, this.guiLeft + 167 + (j2 - 1) * 24 - k2 / 2, this.guiTop + 47, j, i2);
            this.buttonList.add(guibeacon$powerbutton1);

            if (i2 >= i)
            {
                guibeacon$powerbutton1.enabled = false;
            }
            else if (j == k)
            {
                guibeacon$powerbutton1.func_146140_b(true);
            }
        }
    }

    this.beaconConfirmButton.enabled = this.tileBeacon.getStackInSlot(0) != null && j > 0;
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:75,代码来源:GuiBeacon.java

示例2: updateScreen

import net.minecraft.tileentity.TileEntityBeacon; //导入方法依赖的package包/类
public void updateScreen()
{
    super.updateScreen();

    if (this.buttonsNotDrawn && this.tileBeacon.getLevels() >= 0)
    {
        this.buttonsNotDrawn = false;
        int j;
        int k;
        int l;
        int i1;
        GuiBeacon.PowerButton powerbutton;

        for (int i = 0; i <= 2; ++i)
        {
            j = TileEntityBeacon.effectsList[i].length;
            k = j * 22 + (j - 1) * 2;

            for (l = 0; l < j; ++l)
            {
                i1 = TileEntityBeacon.effectsList[i][l].id;
                powerbutton = new GuiBeacon.PowerButton(i << 8 | i1, this.guiLeft + 76 + l * 24 - k / 2, this.guiTop + 22 + i * 25, i1, i);
                this.buttonList.add(powerbutton);

                if (i >= this.tileBeacon.getLevels())
                {
                    powerbutton.enabled = false;
                }
                else if (i1 == this.tileBeacon.getPrimaryEffect())
                {
                    powerbutton.func_146140_b(true);
                }
            }
        }

        byte b0 = 3;
        j = TileEntityBeacon.effectsList[b0].length + 1;
        k = j * 22 + (j - 1) * 2;

        for (l = 0; l < j - 1; ++l)
        {
            i1 = TileEntityBeacon.effectsList[b0][l].id;
            powerbutton = new GuiBeacon.PowerButton(b0 << 8 | i1, this.guiLeft + 167 + l * 24 - k / 2, this.guiTop + 47, i1, b0);
            this.buttonList.add(powerbutton);

            if (b0 >= this.tileBeacon.getLevels())
            {
                powerbutton.enabled = false;
            }
            else if (i1 == this.tileBeacon.getSecondaryEffect())
            {
                powerbutton.func_146140_b(true);
            }
        }

        if (this.tileBeacon.getPrimaryEffect() > 0)
        {
            GuiBeacon.PowerButton powerbutton1 = new GuiBeacon.PowerButton(b0 << 8 | this.tileBeacon.getPrimaryEffect(), this.guiLeft + 167 + (j - 1) * 24 - k / 2, this.guiTop + 47, this.tileBeacon.getPrimaryEffect(), b0);
            this.buttonList.add(powerbutton1);

            if (b0 >= this.tileBeacon.getLevels())
            {
                powerbutton1.enabled = false;
            }
            else if (this.tileBeacon.getPrimaryEffect() == this.tileBeacon.getSecondaryEffect())
            {
                powerbutton1.func_146140_b(true);
            }
        }
    }

    this.beaconConfirmButton.enabled = this.tileBeacon.getStackInSlot(0) != null && this.tileBeacon.getPrimaryEffect() > 0;
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:74,代码来源:GuiBeacon.java

示例3: updateScreen

import net.minecraft.tileentity.TileEntityBeacon; //导入方法依赖的package包/类
/**
 * Called from the main game loop to update the screen.
 */
public void updateScreen()
{
    super.updateScreen();

    if (this.buttonsNotDrawn && this.beacon.getLevels() >= 0)
    {
        this.buttonsNotDrawn = false;
        int i;
        int j;
        int k;
        int l;
        GuiBeaconButtonPower guibeaconbuttonpower;

        for (int i1 = 0; i1 <= 2; ++i1)
        {
            i = TileEntityBeacon.effectsList[i1].length;
            j = i * 22 + (i - 1) * 2;

            for (k = 0; k < i; ++k)
            {
                l = TileEntityBeacon.effectsList[i1][k].id;
                guibeaconbuttonpower = new GuiBeaconButtonPower(this, i1 << 8 | l, this.guiLeft + 76 + k * 24 - j / 2, this.guiTop + 22 + i1 * 25, l, i1);
                this.buttonList.add(guibeaconbuttonpower);

                if (i1 >= this.beacon.getLevels())
                {
                    guibeaconbuttonpower.enabled = false;
                }
                else if (l == this.beacon.getPrimaryEffect())
                {
                    guibeaconbuttonpower.func_82254_b(true);
                }
            }
        }

        byte b0 = 3;
        i = TileEntityBeacon.effectsList[b0].length + 1;
        j = i * 22 + (i - 1) * 2;

        for (k = 0; k < i - 1; ++k)
        {
            l = TileEntityBeacon.effectsList[b0][k].id;
            guibeaconbuttonpower = new GuiBeaconButtonPower(this, b0 << 8 | l, this.guiLeft + 167 + k * 24 - j / 2, this.guiTop + 47, l, b0);
            this.buttonList.add(guibeaconbuttonpower);

            if (b0 >= this.beacon.getLevels())
            {
                guibeaconbuttonpower.enabled = false;
            }
            else if (l == this.beacon.getSecondaryEffect())
            {
                guibeaconbuttonpower.func_82254_b(true);
            }
        }

        if (this.beacon.getPrimaryEffect() > 0)
        {
            GuiBeaconButtonPower guibeaconbuttonpower1 = new GuiBeaconButtonPower(this, b0 << 8 | this.beacon.getPrimaryEffect(), this.guiLeft + 167 + (i - 1) * 24 - j / 2, this.guiTop + 47, this.beacon.getPrimaryEffect(), b0);
            this.buttonList.add(guibeaconbuttonpower1);

            if (b0 >= this.beacon.getLevels())
            {
                guibeaconbuttonpower1.enabled = false;
            }
            else if (this.beacon.getPrimaryEffect() == this.beacon.getSecondaryEffect())
            {
                guibeaconbuttonpower1.func_82254_b(true);
            }
        }
    }

    this.beaconConfirmButton.enabled = this.beacon.getStackInSlot(0) != null && this.beacon.getPrimaryEffect() > 0;
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:77,代码来源:GuiBeacon.java


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