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