MCPcopy Create free account
hub / github.com/BuildCraft/BuildCraft / getRegisteredBlock

Method getRegisteredBlock

common/buildcraft/api/BCBlocks.java:55–73  ·  view source on GitHub ↗
(String module, String regName)

Source from the content-addressed store, hash-verified

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}

Callers 1

BCBlocksClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected