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


Java FlatLayerInfo.getFillBlockMeta方法代码示例

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


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

示例1: drawSlot

import net.minecraft.world.gen.FlatLayerInfo; //导入方法依赖的package包/类
protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p_148126_4_, Tessellator p_148126_5_, int p_148126_6_, int p_148126_7_)
{
    FlatLayerInfo var8 = (FlatLayerInfo)GuiCreateFlatWorld.this.field_146387_g.getFlatLayers().get(GuiCreateFlatWorld.this.field_146387_g.getFlatLayers().size() - p_148126_1_ - 1);
    Item var9 = Item.getItemFromBlock(var8.func_151536_b());
    ItemStack var10 = var8.func_151536_b() == Blocks.air ? null : new ItemStack(var9, 1, var8.getFillBlockMeta());
    String var11 = var10 != null && var9 != null ? var9.getItemStackDisplayName(var10) : "Air";
    this.func_148225_a(p_148126_2_, p_148126_3_, var10);
    GuiCreateFlatWorld.this.fontRendererObj.drawString(var11, p_148126_2_ + 18 + 5, p_148126_3_ + 3, 16777215);
    String var12;

    if (p_148126_1_ == 0)
    {
        var12 = I18n.format("createWorld.customize.flat.layer.top", new Object[] {Integer.valueOf(var8.getLayerCount())});
    }
    else if (p_148126_1_ == GuiCreateFlatWorld.this.field_146387_g.getFlatLayers().size() - 1)
    {
        var12 = I18n.format("createWorld.customize.flat.layer.bottom", new Object[] {Integer.valueOf(var8.getLayerCount())});
    }
    else
    {
        var12 = I18n.format("createWorld.customize.flat.layer", new Object[] {Integer.valueOf(var8.getLayerCount())});
    }

    GuiCreateFlatWorld.this.fontRendererObj.drawString(var12, p_148126_2_ + 2 + 213 - GuiCreateFlatWorld.this.fontRendererObj.getStringWidth(var12), p_148126_3_ + 3, 16777215);
}
 
开发者ID:MinecraftModdedClients,项目名称:Resilience-Client-Source,代码行数:26,代码来源:GuiCreateFlatWorld.java

示例2: drawSlot

import net.minecraft.world.gen.FlatLayerInfo; //导入方法依赖的package包/类
protected void drawSlot(int p_148126_1_, int p_148126_2_, int p_148126_3_, int p_148126_4_, Tessellator p_148126_5_, int p_148126_6_, int p_148126_7_)
{
    FlatLayerInfo flatlayerinfo = (FlatLayerInfo)GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().get(GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().size() - p_148126_1_ - 1);
    Item item = Item.getItemFromBlock(flatlayerinfo.func_151536_b());
    ItemStack itemstack = flatlayerinfo.func_151536_b() == Blocks.air ? null : new ItemStack(item, 1, flatlayerinfo.getFillBlockMeta());
    String s = itemstack != null && item != null ? item.getItemStackDisplayName(itemstack) : "Air";
    this.func_148225_a(p_148126_2_, p_148126_3_, itemstack);
    GuiCreateFlatWorld.this.fontRendererObj.drawString(s, p_148126_2_ + 18 + 5, p_148126_3_ + 3, 16777215);
    String s1;

    if (p_148126_1_ == 0)
    {
        s1 = I18n.format("createWorld.customize.flat.layer.top", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())});
    }
    else if (p_148126_1_ == GuiCreateFlatWorld.this.theFlatGeneratorInfo.getFlatLayers().size() - 1)
    {
        s1 = I18n.format("createWorld.customize.flat.layer.bottom", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())});
    }
    else
    {
        s1 = I18n.format("createWorld.customize.flat.layer", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())});
    }

    GuiCreateFlatWorld.this.fontRendererObj.drawString(s1, p_148126_2_ + 2 + 213 - GuiCreateFlatWorld.this.fontRendererObj.getStringWidth(s1), p_148126_3_ + 3, 16777215);
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:26,代码来源:GuiCreateFlatWorld.java

示例3: drawSlot

import net.minecraft.world.gen.FlatLayerInfo; //导入方法依赖的package包/类
protected void drawSlot(int par1, int par2, int par3, int par4, Tessellator par5Tessellator)
{
    FlatLayerInfo flatlayerinfo = (FlatLayerInfo)GuiCreateFlatWorld.func_82271_a(this.createFlatWorldGui).getFlatLayers().get(GuiCreateFlatWorld.func_82271_a(this.createFlatWorldGui).getFlatLayers().size() - par1 - 1);
    ItemStack itemstack = flatlayerinfo.getFillBlock() == 0 ? null : new ItemStack(flatlayerinfo.getFillBlock(), 1, flatlayerinfo.getFillBlockMeta());
    String s = itemstack == null ? "Air" : Item.itemsList[flatlayerinfo.getFillBlock()].getItemStackDisplayName(itemstack);
    this.func_82452_a(par2, par3, itemstack);
    this.createFlatWorldGui.fontRenderer.drawString(s, par2 + 18 + 5, par3 + 3, 16777215);
    String s1;

    if (par1 == 0)
    {
        s1 = I18n.getStringParams("createWorld.customize.flat.layer.top", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())});
    }
    else if (par1 == GuiCreateFlatWorld.func_82271_a(this.createFlatWorldGui).getFlatLayers().size() - 1)
    {
        s1 = I18n.getStringParams("createWorld.customize.flat.layer.bottom", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())});
    }
    else
    {
        s1 = I18n.getStringParams("createWorld.customize.flat.layer", new Object[] {Integer.valueOf(flatlayerinfo.getLayerCount())});
    }

    this.createFlatWorldGui.fontRenderer.drawString(s1, par2 + 2 + 213 - this.createFlatWorldGui.fontRenderer.getStringWidth(s1), par3 + 3, 16777215);
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:25,代码来源:GuiCreateFlatWorldListSlot.java


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