MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / addMaterialDictionary

Method addMaterialDictionary

src/main/java/gregapi/util/UT.java:636–763  ·  view source on GitHub ↗
(OreDictMaterial aMat)

Source from the content-addressed store, hash-verified

634 }
635
636 public static ItemStack addMaterialDictionary(OreDictMaterial aMat) {
637 boolean temp = F;
638 int tCounter = 0, tPages = 6 + aMat.mAlloyCreationRecipes.size();
639
640 if (aMat.mComponents == null && !aMat.contains(TD.Atomic.ELEMENT)) tPages--;
641
642 if (!aMat.mByProducts.isEmpty()) tPages++;
643
644 if (aMat.mToolTypes > 0) tPages++;
645 if (!aMat.mEnchantmentTools .isEmpty()) tPages++;
646 if (!aMat.mEnchantmentWeapons.isEmpty()) tPages++;
647 if (!aMat.mEnchantmentAmmo .isEmpty()) tPages++;
648 if (!aMat.mEnchantmentRanged .isEmpty()) tPages++;
649 if (!aMat.mEnchantmentFishing.isEmpty()) tPages++;
650 if (!aMat.mEnchantmentArmors .isEmpty()) tPages++;
651
652 if (aMat.mDescription != null) for (int i = 0; i < aMat.mDescription.length; i++) if (Code.stringValid(aMat.mDescription[i])) tPages++;
653
654 for (TagData tTag : TD.Properties.ALL_RELEVANTS) if (aMat.contains(tTag)) {tPages++; break;}
655 for (TagData tTag : TD.Processing.ALL_MACHINES ) if (aMat.contains(tTag)) {tPages++; break;}
656 for (TagData tTag : TD.Processing.ALL_ORES ) if (aMat.contains(tTag)) {tPages++; break;}
657
658 tCounter = 0;
659 for (OreDictMaterial tMat : OreDictMaterial.MATERIAL_MAP.values()) if (tMat.mComponents != null && tMat.contains(TD.Compounds.DECOMPOSABLE)) {
660 for (OreDictMaterialStack tMt2 : tMat.mComponents.getUndividedComponents()) if (tMt2.mMaterial == aMat) {
661 temp=!(tCounter++%6==5);
662 if (!temp) tPages++;
663 break;
664 }
665 }
666 if (temp) {tPages++; temp=F;}
667
668 tCounter = 0;
669 for (OreDictMaterial tMat : OreDictMaterial.MATERIAL_MAP.values()) if (tMat.mByProducts.contains(aMat)) {
670 temp=!(tCounter++%6==5);
671 if (!temp) tPages++;
672 }
673 if (temp) {tPages++; temp=F;}
674
675 tCounter = 0;
676 for (OreDictMaterial tMat : aMat.mTargetedSmelting) if (tMat.mTargetRegistration == tMat && tMat != aMat && tMat.mTargetSmelting.has(aMat)) {
677 temp=!(tCounter++%6==5);
678 if (!temp) tPages++;
679 }
680 if (temp) {tPages++; temp=F;}
681
682 tCounter = 0;
683 for (OreDictMaterial tMat : aMat.mTargetedSolidifying) if (tMat.mTargetRegistration == tMat && tMat != aMat && tMat.mTargetSolidifying.has(aMat)) {
684 temp=!(tCounter++%6==5);
685 if (!temp) tPages++;
686 }
687 if (temp) {tPages++; temp=F;}
688
689 tCounter = 0;
690 for (OreDictMaterial tMat : aMat.mTargetedBurning) if (tMat.mTargetRegistration == tMat && tMat != aMat && tMat.mTargetBurning.has(aMat)) {
691 temp=!(tCounter++%6==5);
692 if (!temp) tPages++;
693 }

Callers 1

runMethod · 0.80

Calls 12

stringValidMethod · 0.95
createWrittenBookMethod · 0.95
makeMethod · 0.95
copyMethod · 0.95
bookMethod · 0.95
containsMethod · 0.65
addMethod · 0.65
sizeMethod · 0.45
isEmptyMethod · 0.45
hasMethod · 0.45
getLocalMethod · 0.45

Tested by

no test coverage detected