mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
package com.hbm.lib;
|
|
|
|
import com.hbm.world.gen.MapGenNTMFeatures;
|
|
import com.hbm.world.gen.NBTStructure;
|
|
import com.hbm.world.gen.NTMWorldGenerator;
|
|
import com.hbm.world.gen.component.*;
|
|
import com.hbm.world.gen.component.BunkerComponents.BunkerStart;
|
|
import cpw.mods.fml.common.IWorldGenerator;
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
|
import net.minecraft.world.gen.structure.MapGenStructureIO;
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
|
|
public class HbmWorld {
|
|
|
|
public static void mainRegistry() {
|
|
initWorldGen();
|
|
}
|
|
|
|
public static NTMWorldGenerator worldGenerator;
|
|
|
|
public static void initWorldGen() {
|
|
MapGenStructureIO.registerStructure(MapGenNTMFeatures.Start.class, "NTMFeatures");
|
|
MapGenStructureIO.registerStructure(BunkerStart.class, "NTMBunker");
|
|
registerNTMFeatures();
|
|
|
|
registerWorldGen(new HbmWorldGen(), 1);
|
|
|
|
worldGenerator = new NTMWorldGenerator();
|
|
registerWorldGen(worldGenerator, 1); //Ideally, move everything over from HbmWorldGen to NTMWorldGenerator
|
|
MinecraftForge.EVENT_BUS.register(worldGenerator);
|
|
|
|
NBTStructure.register();
|
|
}
|
|
|
|
private static void registerWorldGen(IWorldGenerator nukerWorldGen, int weightedProbability) {
|
|
GameRegistry.registerWorldGenerator(nukerWorldGen, weightedProbability);
|
|
}
|
|
|
|
/** Register structures in MapGenStructureIO */
|
|
private static void registerNTMFeatures() {
|
|
CivilianFeatures.registerComponents();
|
|
OfficeFeatures.registerComponents();
|
|
RuinFeatures.registerComponents();
|
|
BunkerComponents.registerComponents();
|
|
MapGenStructureIO.func_143031_a(SiloComponent.class, "NTMSiloComponent");
|
|
}
|
|
} |