/
JustEnoughItems.java
52 lines (41 loc) · 1.6 KB
/
JustEnoughItems.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
package mezz.jei;
import javax.annotation.Nonnull;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLLoadCompleteEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import mezz.jei.api.JEIManager;
import mezz.jei.config.Constants;
import mezz.jei.gui.GuiHelper;
import mezz.jei.network.PacketHandler;
@Mod(modid = Constants.MOD_ID,
name = Constants.NAME,
version = Constants.VERSION,
guiFactory = "mezz.jei.config.JEIModGuiFactory",
dependencies = "required-after:Forge@[11.14.0.1269,);")
public class JustEnoughItems {
@SidedProxy(clientSide = "mezz.jei.ProxyCommonClient", serverSide = "mezz.jei.ProxyCommon")
public static ProxyCommon common;
@Mod.Instance(Constants.MOD_ID)
public static JustEnoughItems instance;
public static PacketHandler packetHandler;
private PluginRegistry pluginRegistry;
@Mod.EventHandler
public void preInit(@Nonnull FMLPreInitializationEvent event) {
packetHandler = new PacketHandler();
JEIManager.pluginRegistry = pluginRegistry = new PluginRegistry();
JEIManager.guiHelper = new GuiHelper();
common.preInit(event);
}
@Mod.EventHandler
public void init(@Nonnull FMLInitializationEvent event) {
pluginRegistry.init();
common.init(event);
}
@Mod.EventHandler
public void loadComplete(@Nonnull FMLLoadCompleteEvent event) {
JEIManager.recipeRegistry = pluginRegistry.createRecipeRegistry();
common.loadComplete(event);
}
}