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


Java Item.COBBLESTONE属性代码示例

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


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

示例1: getDrops

@Override
public int[][] getDrops(Item item) {
    if (item.isPickaxe() && item.getTier() >= ItemTool.TIER_WOODEN) {
        return new int[][]{
                {Item.COBBLESTONE, 0, 1}
        };
    } else {
        return new int[0][0];
    }
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:10,代码来源:BlockCobblestone.java

示例2: getDrops

@Override
public int[][] getDrops(Item item) {
    if (item.isPickaxe() && item.getTier() >= ItemTool.TIER_WOODEN) {
        return new int[][]{
                {this.getDamage() == 0 ? Item.COBBLESTONE : Item.STONE, this.getDamage(), 1}
        };
    } else {
        return new int[0][0];
    }
}
 
开发者ID:FrontierDevs,项目名称:Jenisys3,代码行数:10,代码来源:BlockStone.java

示例3: 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

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