ModInit.java 947 Bytes
Newer Older
1
package com.owlmaddie;
modmuss committed
2

3
import com.owlmaddie.commands.CreatureChatCommands;
4
import com.owlmaddie.network.ServerPackets;
modmuss committed
5 6 7 8
import net.fabricmc.api.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

9
/**
10
 * The {@code ModInit} class initializes this mod on the server and defines all the server message
11 12 13
 * identifiers. It also listens for messages from the client, and has code to send
 * messages to the client.
 */
14
public class ModInit implements ModInitializer {
15
	public static final Logger LOGGER = LoggerFactory.getLogger("creaturechat");
modmuss committed
16

17 18 19 20 21
	@Override
	public void onInitialize() {
		// This code runs as soon as Minecraft is in a mod-load-ready state.
		// However, some things (like resources) may still be uninitialized.
		// Proceed with mild caution.
modmuss committed
22

23 24 25
		// Register server commands
		CreatureChatCommands.register();

26 27
		// Register events
		ServerPackets.register();
28

29
		LOGGER.info("CreatureChat MOD Initialized!");
30
	}
modmuss committed
31
}