| 53 | } |
| 54 | |
| 55 | private static Block getRegisteredBlock(String module, String regName) { |
| 56 | String modid = "buildcraft" + module; |
| 57 | Block block = Block.REGISTRY.getObject(new ResourceLocation(modid, regName)); |
| 58 | |
| 59 | if (block != Blocks.AIR) { |
| 60 | if (DEBUG) { |
| 61 | BCLog.logger.info("[api.blocks] Found the block " + regName + " from the module " + module); |
| 62 | } |
| 63 | return block; |
| 64 | } |
| 65 | if (DEBUG) { |
| 66 | if (Loader.isModLoaded(modid)) { |
| 67 | BCLog.logger.info("[api.blocks] Did not find the block " + regName + " dispite the appropriate mod being loaded (" + modid + ")"); |
| 68 | } else { |
| 69 | BCLog.logger.info("[api.blocks] Did not find the block " + regName + " probably because the mod is not loaded (" + modid + ")"); |
| 70 | } |
| 71 | } |
| 72 | return null; |
| 73 | } |
| 74 | } |