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


Java Item.GOLD_INGOT属性代码示例

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


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

示例1: registerArmor

protected void registerArmor() {
    int[][] types = {
            {Item.LEATHER, Item.FIRE, Item.IRON_INGOT, Item.DIAMOND, Item.GOLD_INGOT},
            {Item.LEATHER_CAP, Item.CHAIN_HELMET, Item.IRON_HELMET, Item.DIAMOND_HELMET, Item.GOLD_HELMET},
            {Item.LEATHER_TUNIC, Item.CHAIN_CHESTPLATE, Item.IRON_CHESTPLATE, Item.DIAMOND_CHESTPLATE, Item.GOLD_CHESTPLATE},
            {Item.LEATHER_PANTS, Item.CHAIN_LEGGINGS, Item.IRON_LEGGINGS, Item.DIAMOND_LEGGINGS, Item.GOLD_LEGGINGS},
            {Item.LEATHER_BOOTS, Item.CHAIN_BOOTS, Item.IRON_BOOTS, Item.DIAMOND_BOOTS, Item.GOLD_BOOTS},
    };

    String[][] shapes = new String[][]{
            new String[]{
                    "XXX",
                    "X X",
                    "   "
            },
            new String[]{
                    "X X",
                    "XXX",
                    "XXX"
            },
            new String[]{
                    "XXX",
                    "X X",
                    "X X"
            },
            new String[]{
                    "   ",
                    "X X",
                    "X X"
            }
    };
    for (int i = 1; i < 5; ++i) {
        for (int j = 0; j < types[i].length; j++) {
            int type = types[i][j];
            this.registerRecipe((new BigShapedRecipe(Item.get(type, 0, 1), shapes[i - 1])).setIngredient("X", Item.get(types[0][j], 0, 1)));
        }
    }
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:38,代码来源:CraftingManager.java

示例2: registerWeapons

protected void registerWeapons() {
    int[][] types = {
            {Item.WOODEN_PLANK, Item.COBBLESTONE, Item.IRON_INGOT, Item.DIAMOND, Item.GOLD_INGOT},
            {Item.WOODEN_SWORD, Item.STONE_SWORD, Item.IRON_SWORD, Item.DIAMOND_SWORD, Item.GOLD_SWORD},
    };
    for (int i = 1; i < 2; ++i) {
        for (int j = 0; j < types[i].length; j++) {
            int type = types[i][j];
            this.registerRecipe((new BigShapedRecipe(Item.get(type, 0, 1),
                    " X ",
                    " X ",
                    " I "
            )).setIngredient("X", Item.get(types[0][j], null)).setIngredient("I", Item.get(Item.STICK)));
        }
    }

    this.registerRecipe((new BigShapedRecipe(Item.get(Item.ARROW, 0, 1),
            " F ",
            " S ",
            " P "
    )).setIngredient("S", Item.get(Item.STICK)).setIngredient("F", Item.get(Item.FLINT)).setIngredient("P", Item.get(Item.FEATHER)));

    this.registerRecipe((new BigShapedRecipe(Item.get(Item.BOW, 0, 1),
            " X~",
            "X ~",
            " X~"
    )).setIngredient("~", Item.get(Item.STRING)).setIngredient("X", Item.get(Item.STICK)));
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:28,代码来源:CraftingManager.java

示例3: registerIngots

protected void registerIngots() {
    int[][] ingots = new int[][]{
            {Item.GOLD_BLOCK, Item.GOLD_INGOT},
            {Item.GOLD_INGOT, Item.GOLD_NUGGET},
            {Item.IRON_BLOCK, Item.IRON_INGOT},
            {Item.DIAMOND_BLOCK, Item.DIAMOND},
            {Item.EMERALD_BLOCK, Item.EMERALD},
            {Item.REDSTONE_BLOCK, Item.REDSTONE_DUST},
            {Item.COAL_BLOCK, Item.COAL},
            {Item.HAY_BALE, Item.WHEAT},
            {Item.LAPIS_BLOCK, Item.DYE, 4}
    };

    for (int[] e : ingots) {
        int block = e[0];
        int ingot = e[1];
        int ingot_meta = e.length > 2 ? e[2] : 0;

        this.registerRecipe((new ShapedRecipe(Item.get(ingot, ingot_meta, 9),
                "X"
        )).setIngredient("X", Item.get(block, 0, 1)));

        this.registerRecipe((new BigShapedRecipe(Item.get(block, 0, 1),
                "XXX",
                "XXX",
                "XXX"
        )).setIngredient("X", Item.get(ingot, ingot_meta, 1)));
    }

}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:30,代码来源:CraftingManager.java

示例4: registerTools

protected void registerTools() {
    int[][] types = {
            {Item.WOODEN_PLANK, Item.COBBLESTONE, Item.IRON_INGOT, Item.DIAMOND, Item.GOLD_INGOT},
            {Item.WOODEN_PICKAXE, Item.STONE_PICKAXE, Item.IRON_PICKAXE, Item.DIAMOND_PICKAXE, Item.GOLD_PICKAXE},
            {Item.WOODEN_SHOVEL, Item.STONE_SHOVEL, Item.IRON_SHOVEL, Item.DIAMOND_SHOVEL, Item.GOLD_SHOVEL},
            {Item.WOODEN_AXE, Item.STONE_AXE, Item.IRON_AXE, Item.DIAMOND_AXE, Item.GOLD_AXE},
            {Item.WOODEN_HOE, Item.STONE_HOE, Item.IRON_HOE, Item.DIAMOND_HOE, Item.GOLD_HOE},
    };
    String[][] shapes = new String[][]{
            new String[]{
                    "XXX",
                    " I ",
                    " I "
            },
            new String[]{
                    " X ",
                    " I ",
                    " I "
            },
            new String[]{
                    "XX ",
                    "XI ",
                    " I "
            },
            new String[]{
                    "XX ",
                    " I ",
                    " I "
            }
    };
    for (int i = 1; i < 5; ++i) {
        for (int j = 0; j < types[i].length; j++) {
            int type = types[i][j];
            this.registerRecipe((new BigShapedRecipe(Item.get(type, 0, 1), shapes[i - 1])).setIngredient('X', Item.get(types[0][j], null)).setIngredient('I', Item.get(Item.STICK)));
        }
    }

    this.registerRecipe((new ShapedRecipe(Item.get(Item.FLINT_AND_STEEL, 0, 1),
            " S",
            "F "
    )).setIngredient('F', Item.get(Item.FLINT)).setIngredient("S", Item.get(Item.IRON_INGOT)));

    this.registerRecipe((new ShapedRecipe(Item.get(Item.SHEARS, 0, 1),
            " X",
            "X "
    )).setIngredient("X", Item.get(Item.IRON_INGOT)));
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:47,代码来源:CraftingManager.java


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