本文整理汇总了Java中org.bukkit.Material.HUGE_MUSHROOM_2属性的典型用法代码示例。如果您正苦于以下问题:Java Material.HUGE_MUSHROOM_2属性的具体用法?Java Material.HUGE_MUSHROOM_2怎么用?Java Material.HUGE_MUSHROOM_2使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.bukkit.Material
的用法示例。
在下文中一共展示了Material.HUGE_MUSHROOM_2属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getTrackedTreeMaterial
public Material getTrackedTreeMaterial(String trackedType) {
if (Material.CHORUS_PLANT.toString().equals(trackedType))
return Material.CHORUS_PLANT;
else {
for (TreeType treeType : TreeType.values()) {
if (treeType.toString().equals(trackedType)) {
if (treeType == TreeType.ACACIA || treeType == TreeType.DARK_OAK)
return Material.LOG_2;
else if (treeType == TreeType.BROWN_MUSHROOM)
return Material.HUGE_MUSHROOM_1;
else if (treeType == TreeType.RED_MUSHROOM)
return Material.HUGE_MUSHROOM_2;
else
return Material.LOG;
}
}
}
CropControl.getPlugin().debug("Unable to match tracked tree type material {0}", trackedType);
return null;
}
示例2: getTrackedTypeMaterial
public Material getTrackedTypeMaterial(String trackedType) {
for (Material material : harvestableCrops.keySet()) {
if (material.toString().equals(trackedType))
return material;
}
if (Material.MELON_BLOCK.toString().equals(trackedType))
return Material.MELON_BLOCK;
else if (Material.PUMPKIN.toString().equals(trackedType))
return Material.PUMPKIN;
for (Byte i = 0; i < 6; i++) {
if (getSaplingType(i).equals(trackedType)) // TODO: odd structure here
return Material.SAPLING;
}
for (TreeType treeType : TreeType.values()) {
if (treeType.toString().equals(trackedType)) {
if (treeType == TreeType.ACACIA || treeType == TreeType.DARK_OAK)
return Material.LOG_2;
else if (treeType == TreeType.BROWN_MUSHROOM)
return Material.HUGE_MUSHROOM_1;
else if (treeType == TreeType.RED_MUSHROOM)
return Material.HUGE_MUSHROOM_2;
else
return Material.LOG;
}
}
if (Material.CHORUS_PLANT.toString().equals(trackedType))
return Material.CHORUS_PLANT;
CropControl.getPlugin().debug("Unable to match tracked type material {0}", trackedType);
return null;
}