/
TMechworks.java
57 lines (43 loc) · 2.02 KB
/
TMechworks.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package slimeknights.tmechworks;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.*;
import net.minecraftforge.fml.common.event.*;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import slimeknights.mantle.common.GuiHandler;
import slimeknights.mantle.network.NetworkWrapper;
import slimeknights.tmechworks.common.*;
import slimeknights.tmechworks.integration.WailaIntegration;
import slimeknights.tmechworks.networking.PacketUpdatePlaceDirection;
@Mod(modid = TMechworks.modID, name = TMechworks.modName, version = TMechworks.modVersion, dependencies = "required-after:forge@[14.23.4.2705,); required-after:mantle@[1.12-1.3.2,); after:jei@[4.9,); after:waila@[1.8,)", acceptedMinecraftVersions = "[1.12.2, 1.13)")
public class TMechworks
{
public static final String modID = "tmechworks";
public static final String modVersion = "${version}";
public static final String modName = "Tinkers' Mechworks";
public static MechworksContent content;
public static NetworkWrapper packetPipeline;
@Mod.Instance(modID) public static TMechworks instance;
@SidedProxy(modId = modID, clientSide = "slimeknights.tmechworks.client.ClientProxy", serverSide = "slimeknights.tmechworks.common.CommonProxy") public static CommonProxy proxy;
@Mod.EventHandler public void preInit (FMLPreInitializationEvent event)
{
NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler());
if (Loader.isModLoaded("Waila"))
{
new WailaIntegration();
}
content = new MechworksContent();
MinecraftForge.EVENT_BUS.register(content);
proxy.preInit();
packetPipeline = new NetworkWrapper(modID);
// Register packets
packetPipeline.registerPacket(PacketUpdatePlaceDirection.class);
}
@Mod.EventHandler public void init (FMLInitializationEvent event)
{
proxy.init();
}
@Mod.EventHandler public void postInit (FMLInitializationEvent event)
{
proxy.postInit();
}
}