(String materialName, int id, boolean isBlock)
| 8637 | } |
| 8638 | |
| 8639 | public static Material addMaterial(String materialName, int id, boolean isBlock) { |
| 8640 | // Forge Blocks |
| 8641 | if (isBlock) { |
| 8642 | Material material = BY_NAME.get(materialName); |
| 8643 | if (material != null){ |
| 8644 | material.isForgeBlock = true; |
| 8645 | }else { |
| 8646 | material = (Material) MohistEnumHelper.addEnum(Material.class, materialName, new Class[]{Integer.TYPE, Boolean.TYPE}, new Object[]{Integer.valueOf(id), true}); |
| 8647 | } |
| 8648 | BY_NAME.put(materialName, material); |
| 8649 | return material; |
| 8650 | } else { // Forge Items |
| 8651 | Material material = (Material) MohistEnumHelper.addEnum(Material.class, materialName, new Class[]{Integer.TYPE, Boolean.TYPE}, new Object[]{Integer.valueOf(id), false}); |
| 8652 | BY_NAME.put(materialName, material); |
| 8653 | return material; |
| 8654 | } |
| 8655 | } |
| 8656 | } |
no test coverage detected