summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/worldGen/village/VillageHandler.java
blob: 0a4b832386382e2607e268a8171882da88f0664e (plain)
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
/**
 * 
 */
package darkknight.jewelrycraft.worldGen.village;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.VillagerRegistry;
import darkknight.jewelrycraft.JewelrycraftMod;
import darkknight.jewelrycraft.util.Variables;
import net.minecraft.world.gen.structure.MapGenStructureIO;

public class VillageHandler {
	public static void preInit(FMLPreInitializationEvent e) {
		VillagerRegistry.instance().registerVillagerId(3000);
		VillagerRegistry.instance().registerVillageTradeHandler(
				3000, new JCTrades());
		VillagerRegistry.instance().registerVillageCreationHandler(
				new VillageJewelryHandler());
		try {
			MapGenStructureIO.func_143031_a(
					ComponentJewelry.class,
					Variables.MODID + ":Jewelry");
		} catch (Throwable thrw) {
			JewelrycraftMod.logger.error(
					"Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.10");
		}
	}
}