本文整理汇总了Java中cn.nukkit.item.Item.WOODEN_PLANK属性的典型用法代码示例。如果您正苦于以下问题:Java Item.WOODEN_PLANK属性的具体用法?Java Item.WOODEN_PLANK怎么用?Java Item.WOODEN_PLANK使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类cn.nukkit.item.Item
的用法示例。
在下文中一共展示了Item.WOODEN_PLANK属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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)));
}
示例2: 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)));
}