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

Method onModPreInit2

src/main/java/gregapi/GT_API_Post.java:76–180  ·  view source on GitHub ↗
(FMLPreInitializationEvent aEvent)

Source from the content-addressed store, hash-verified

74 @Mod.EventHandler public final void onServerStopped (FMLServerStoppedEvent aEvent) {onModServerStopped(aEvent);}
75
76 @Override
77 public void onModPreInit2(FMLPreInitializationEvent aEvent) {
78 try {
79 LoadController tLoadController = ((LoadController)UT.Reflection.getFieldContent(Loader.instance(), "modController", T, T));
80 List<ModContainer> tModList = tLoadController.getActiveModList(), tNewModsList = new ArrayList<>(tModList.size());
81 ModContainer tGregTech = null;
82 for (short i = 0; i < tModList.size(); i++) {
83 ModContainer tMod = tModList.get(i);
84 if (tMod.getModId().equalsIgnoreCase(MD.GAPI_POST.mID)) tGregTech = tMod; else tNewModsList.add(tMod);
85 }
86 if (tGregTech != null) tNewModsList.add(tGregTech);
87 UT.Reflection.setFieldContent(tLoadController, "activeModList", tNewModsList);
88 } catch(Throwable e) {
89 e.printStackTrace(ERR);
90 }
91
92 // Fixing Items of certain Mods.
93 for (Item tItem : new Item[] {
94 ST.item(MD.GrC_Grapes, "grc.grapes")
95 , ST.item(MD.FR, "letters")
96 , ST.item(MD.FZ, "acid")
97 }) if (tItem != null) tItem.setMaxDamage(0).setHasSubtypes(T);
98
99 OM.blacklist(ST.make(MD.GrC_Bees, "grcbees.BeesWax", 1, 1));
100 OM.blacklist(ST.make(MD.GrC_Bees, "grcbees.BeesWax", 1, 2));
101 OM.blacklist(ST.make(MD.TC, "ItemResource", 1, 6));
102 OM.blacklist(ST.make(MD.TC, "ItemResource", 1,18));
103 OM.blacklist(ST.make(MD.FZ, "diamond_shard", 1, W));
104 OM.blacklist(ST.make(MD.ReC, "reactorcraft_item_fluorite", 1, W));
105 OM.blacklist(ST.make(MD.ERE, "encrustedDiamond", 1, W));
106 OM.blacklist(ST.make(MD.BTL, "groundStuff", 1, 16));
107 OM.blacklist(ST.make(MD.BoP, "gems", 1, 0));
108 OM.blacklist(ST.make(MD.BoP, "gems", 1, 1));
109 OM.blacklist(ST.make(MD.BoP, "gems", 1, 2));
110 OM.blacklist(ST.make(MD.BoP, "gems", 1, 3));
111 OM.blacklist(ST.make(MD.BoP, "gems", 1, 4));
112 OM.blacklist(ST.make(MD.BoP, "gems", 1, 5));
113 OM.blacklist(ST.make(MD.BoP, "gems", 1, 6));
114 OM.blacklist(ST.make(MD.BoP, "gems", 1, 7));
115
116 new LoaderItemList().run();
117 new LoaderItemData().run();
118 new LoaderUnificationTargets().run();
119
120 if (MD.MET.mLoaded) {
121 MT.OREMATS.Bauxite .addOreByProducts(MT.Alduorite );
122 MT.OREMATS.Chalcopyrite .addOreByProducts(MT.Infuscolium );
123 MT.OREMATS.Scheelite .addOreByProducts(MT.Rubracium );
124 MT.OREMATS.Pentlandite .addOreByProducts(MT.Meutoite );
125 MT.MgCO3 .addOreByProducts(MT.Lemurite );
126 MT.Ardite .addOreByProducts(MT.Aredrite );
127 MT.Co .addOreByProducts(MT.Aredrite );
128 MT.OREMATS.Cobaltite .addOreByProducts(MT.Aredrite );
129 MT.OREMATS.Stibnite .addOreByProducts(MT.Ceruclase );
130 MT.OREMATS.Garnierite .addOreByProducts(MT.Oureclase );
131 MT.OREMATS.Cooperite .addOreByProducts(MT.Kalendrite );
132 MT.OREMATS.Ilmenite .addOreByProducts(MT.Orichalcum );
133 MT.OREMATS.Sphalerite .addOreByProducts(MT.Carmot );

Callers

nothing calls this directly

Calls 11

itemMethod · 0.95
blacklistMethod · 0.95
makeMethod · 0.95
getFieldContentMethod · 0.80
setFieldContentMethod · 0.80
addOreByProductsMethod · 0.80
disableItemGenerationMethod · 0.80
getMethod · 0.65
addMethod · 0.65
sizeMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected