summaryrefslogtreecommitdiff
path: root/src/main/java/darkknight/jewelrycraft/worldGen/village/VillageHandler.java
blob: 49c2d3750561f8e25d053d77fd451d37e2cd72ff (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
/**
 * 
 */
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");
		}
	}
}