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

Method getRegisteredItem

common/buildcraft/api/BCItems.java:147–166  ·  view source on GitHub ↗
(String module, String regName)

Source from the content-addressed store, hash-verified

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}

Callers 1

BCItemsClass · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected