1
1
package com .Nxer .TwistSpaceTechnology ;
2
2
3
+ import static com .Nxer .TwistSpaceTechnology .loader .RecipeLoader .loadRecipesServerStarted ;
4
+
3
5
import net .minecraftforge .common .MinecraftForge ;
4
6
5
7
import com .Nxer .TwistSpaceTechnology .combat .DamageEventHandler ;
6
8
import com .Nxer .TwistSpaceTechnology .combat .PlayerEventHandler ;
9
+ import com .Nxer .TwistSpaceTechnology .combat .items .ItemRegister ;
7
10
import com .Nxer .TwistSpaceTechnology .command .CombatRework_Command ;
8
11
import com .Nxer .TwistSpaceTechnology .command .TST_AdminCommand ;
9
12
import com .Nxer .TwistSpaceTechnology .command .TST_Command ;
13
+ import com .Nxer .TwistSpaceTechnology .common .api .ModBlocksHandler ;
14
+ import com .Nxer .TwistSpaceTechnology .common .api .ModItemsHandler ;
15
+ import com .Nxer .TwistSpaceTechnology .common .entity .EntityMountableBlock ;
16
+ import com .Nxer .TwistSpaceTechnology .common .ic2Crop .CropInfo ;
10
17
import com .Nxer .TwistSpaceTechnology .common .item .ItemYamato ;
11
18
import com .Nxer .TwistSpaceTechnology .common .machine .TST_BigBroArray ;
19
+ import com .Nxer .TwistSpaceTechnology .common .machine .singleBlock .hatch .GT_Hatch_RackComputationMonitor ;
12
20
import com .Nxer .TwistSpaceTechnology .common .recipeMap .recipeResult .ResultInsufficientTier ;
13
21
import com .Nxer .TwistSpaceTechnology .config .Config ;
14
22
import com .Nxer .TwistSpaceTechnology .event .ServerEvent ;
15
23
import com .Nxer .TwistSpaceTechnology .event .StartServerEvent ;
16
24
import com .Nxer .TwistSpaceTechnology .event .TickingEvent ;
25
+ import com .Nxer .TwistSpaceTechnology .loader .LazyStaticsInitLoader ;
26
+ import com .Nxer .TwistSpaceTechnology .loader .MachineLoader ;
27
+ import com .Nxer .TwistSpaceTechnology .loader .MaterialLoader ;
28
+ import com .Nxer .TwistSpaceTechnology .loader .OreDictLoader ;
29
+ import com .Nxer .TwistSpaceTechnology .loader .RecipeLoader ;
30
+ import com .Nxer .TwistSpaceTechnology .loader .TCLoader ;
17
31
import com .Nxer .TwistSpaceTechnology .network .TST_Network ;
18
32
import com .Nxer .TwistSpaceTechnology .system .DysonSphereProgram .logic .DSP_WorldSavedData ;
19
33
import com .Nxer .TwistSpaceTechnology .system .ProcessingArrayBackend .PAHelper ;
23
37
import bartworks .API .SideReference ;
24
38
import cpw .mods .fml .common .FMLCommonHandler ;
25
39
import cpw .mods .fml .common .event .FMLInitializationEvent ;
40
+ import cpw .mods .fml .common .event .FMLLoadCompleteEvent ;
26
41
import cpw .mods .fml .common .event .FMLPostInitializationEvent ;
27
42
import cpw .mods .fml .common .event .FMLPreInitializationEvent ;
28
43
import cpw .mods .fml .common .event .FMLServerStartedEvent ;
29
44
import cpw .mods .fml .common .event .FMLServerStartingEvent ;
45
+ import cpw .mods .fml .common .registry .EntityRegistry ;
30
46
import gregtech .api .recipe .check .CheckRecipeResultRegistry ;
31
47
import gregtech .common .render .GTTextureBuilder ;
32
48
33
49
public class CommonProxy {
34
50
35
- // preInit "Run before anything else. Read your config, create blocks, items, etc, and register them with the
36
- // GameRegistry." (Remove if not needed)
37
51
public void preInit (FMLPreInitializationEvent event ) {
38
52
Config .synchronizeConfiguration (event .getSuggestedConfigurationFile ());
39
53
if (Config .activateCombatStats ) {
40
54
MinecraftForge .EVENT_BUS .register (new PlayerEventHandler ());
41
55
}
42
56
TwistSpaceTechnology .LOG .info (Tags .MODNAME + " at version " + Tags .VERSION );
57
+
58
+ MaterialLoader .load ();
59
+
60
+ if (Config .activateCombatStats ) {
61
+ ItemRegister .registry ();
62
+ }
43
63
}
44
64
45
- // load "Do your mod setup. Build whatever data structures you care about. Register recipes." (Remove if not needed)
46
65
public void init (FMLInitializationEvent event ) {
47
66
48
67
MinecraftForge .EVENT_BUS .register (new DSP_WorldSavedData ());
@@ -71,9 +90,22 @@ public void init(FMLInitializationEvent event) {
71
90
new GTTextureBuilder ().setFromBlock (ModBlocks .bloodRune , 0 )
72
91
.build ());
73
92
93
+ new LazyStaticsInitLoader ().initStaticsOnInit ();
94
+ MachineLoader .loadMachines ();
95
+ GT_Hatch_RackComputationMonitor .run ();
96
+ EntityRegistry .registerModEntity (
97
+ EntityMountableBlock .class ,
98
+ "TST:EntityMountableBlock" ,
99
+ 1 ,
100
+ TwistSpaceTechnology .instance ,
101
+ 256 ,
102
+ 20 ,
103
+ false );
104
+
105
+ new ModBlocksHandler ().initStatics ();
106
+ new ModItemsHandler ().initStatics ();
74
107
}
75
108
76
- // postInit "Handle interaction with other mods, complete your setup based on this." (Remove if not needed)
77
109
public void postInit (FMLPostInitializationEvent event ) {
78
110
TST_Network .registryNetwork ();
79
111
@@ -90,9 +122,22 @@ public void postInit(FMLPostInitializationEvent event) {
90
122
if (Config .RewriteEIOTravelStaffConfig ) {
91
123
ItemYamato .rewriteEIOTravelStaffConfig ();
92
124
}
125
+
126
+ MachineLoader .loadMachinePostInit ();
127
+ OreDictLoader .loadOreDictionary ();
128
+ RecipeLoader .loadRecipesPostInit ();
129
+
130
+ CropInfo .registerAllCropInfo ();
131
+
132
+ TCLoader .load ();
133
+ }
134
+
135
+ public void complete (FMLLoadCompleteEvent event ) {
136
+ RecipeLoader .loadRecipes ();
137
+
138
+ new LazyStaticsInitLoader ().initStaticsOnCompleteInit ();
93
139
}
94
140
95
- // register server commands in this event handler (Remove if not needed)
96
141
public void serverStarting (FMLServerStartingEvent event ) {
97
142
TwistSpaceTechnology .LOG .info ("Ok, " + Tags .MODNAME + " at version " + Tags .VERSION + " load success ." );
98
143
event .registerServerCommand (new TST_Command ());
@@ -105,6 +150,7 @@ public void serverStarting(FMLServerStartingEvent event) {
105
150
public void serverStarted (FMLServerStartedEvent event ) {
106
151
TwistSpaceTechnology .LOG .info ("Init DSP Event." );
107
152
StartServerEvent .INSTANCE .onLoading (event );
108
- }
109
153
154
+ loadRecipesServerStarted ();
155
+ }
110
156
}
0 commit comments