| 145 | } |
| 146 | |
| 147 | private static Item getRegisteredItem(String module, String regName) { |
| 148 | String modid = "buildcraft" + module; |
| 149 | Item item = Item.REGISTRY.getObject(new ResourceLocation(modid, regName)); |
| 150 | if (item != null) { |
| 151 | if (DEBUG) { |
| 152 | BCLog.logger.info("[api.items] Found the item " + regName + " from the module " + module); |
| 153 | SCANNED.add(modid + ":" + regName); |
| 154 | } |
| 155 | return item; |
| 156 | } |
| 157 | if (DEBUG) { |
| 158 | if (Loader.isModLoaded(modid)) { |
| 159 | BCLog.logger.info("[api.items] Did not find the item " + regName + " dispite the appropriate mod being loaded (" + modid + ")"); |
| 160 | } else { |
| 161 | BCLog.logger.info("[api.items] Did not find the item " + regName + " probably because the mod is not loaded (" + modid + ")"); |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | return null; |
| 166 | } |
| 167 | } |