MCPcopy Index your code
hub / github.com/GregTech6/gregtech6 / mkic

Method mkic

src/main/java/gregapi/util/ST.java:361–371  ·  view source on GitHub ↗
(String aItem, long aSize)

Source from the content-addressed store, hash-verified

359 return validate(GameRegistry.findItemStack(aModID.mID, aItem.substring(5), (int)aSize));
360 }
361 public static ItemStack mkic(String aItem, long aSize) {
362 if (UT.Code.stringInvalid(aItem) || !GAPI_POST.mStartedPreInit) return null;
363 if (!sIC2ItemMap.containsKey(aItem)) try {
364 ItemStack tStack = validate(IC2Items.getItem(aItem));
365 sIC2ItemMap.put(aItem, tStack);
366 if (tStack == null && MD.IC2.mLoaded && !aItem.startsWith("rubber")) ERR.println(aItem + " is not found in the IC2 Items!");
367 } catch (Throwable e) {
368 sIC2ItemMap.put(aItem, null);
369 }
370 return amount(aSize, sIC2ItemMap.get(aItem));
371 }
372
373 private static final Map<String, ItemStack> sIC2ItemMap = new HashMap<>();
374

Callers 10

runMethod · 0.95
runMethod · 0.95
runMethod · 0.95
makeIC2Method · 0.95
runMethod · 0.95
runMethod · 0.95
onPostLoadMethod · 0.95
onOreRegistrationMethod · 0.95
onPostLoadMethod · 0.95
runMethod · 0.95

Calls 10

validateMethod · 0.95
amountMethod · 0.95
metaMethod · 0.95
getMethod · 0.95
stringInvalidMethod · 0.80
containsKeyMethod · 0.80
printlnMethod · 0.80
getItemMethod · 0.65
getMethod · 0.65
putMethod · 0.45

Tested by

no test coverage detected