63 lines
2.2 KiB
Java
63 lines
2.2 KiB
Java
|
|
package net.yseven.findyourway;
|
||
|
|
|
||
|
|
|
||
|
|
import net.minecraft.item.Item;
|
||
|
|
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||
|
|
import net.minecraftforge.common.MinecraftForge;
|
||
|
|
import net.minecraftforge.event.RegistryEvent;
|
||
|
|
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.FMLPostInitializationEvent;
|
||
|
|
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||
|
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||
|
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||
|
|
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||
|
|
import net.minecraftforge.fml.relauncher.Side;
|
||
|
|
import net.yseven.findyourway.Network.PacketSendKey;
|
||
|
|
import net.yseven.findyourway.item.ModItems;
|
||
|
|
|
||
|
|
@Mod(modid = FindYourWay.modId, name = FindYourWay.name, version = FindYourWay.version)
|
||
|
|
public class FindYourWay {
|
||
|
|
public static final String modId = "findyourway";
|
||
|
|
public static final String name = "Find Your Way";
|
||
|
|
public static final String version = "1.0.0-beta";
|
||
|
|
|
||
|
|
@Mod.Instance(modId)
|
||
|
|
public static FindYourWay instance;
|
||
|
|
|
||
|
|
@SidedProxy(serverSide = "net.yseven.findyourway.CommonProxy", clientSide = "net.yseven.findyourway.Client.ClientProxy")
|
||
|
|
public static CommonProxy proxy;
|
||
|
|
public static SimpleNetworkWrapper network;
|
||
|
|
|
||
|
|
@Mod.EventHandler
|
||
|
|
public void preInit(FMLPreInitializationEvent event) {
|
||
|
|
System.out.println(name + " is loading!");
|
||
|
|
|
||
|
|
proxy.preInit(event);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Mod.EventHandler
|
||
|
|
public void init(FMLInitializationEvent event) {
|
||
|
|
proxy.init(event);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Mod.EventHandler
|
||
|
|
public void postInit(FMLPostInitializationEvent event) {
|
||
|
|
proxy.postInit(event);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Mod.EventBusSubscriber
|
||
|
|
public static class RegistrationHandler {
|
||
|
|
@SubscribeEvent
|
||
|
|
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||
|
|
ModItems.register(event.getRegistry());
|
||
|
|
}
|
||
|
|
|
||
|
|
@SubscribeEvent
|
||
|
|
public static void registerModels(ModelRegistryEvent event) {
|
||
|
|
ModItems.registerModels();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|