SHARE
TWEET

Untitled

a guest Jan 25th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package fr.kiwiofficiel.sumaria.common;
  2.  
  3. import java.util.Random;
  4.  
  5. import cpw.mods.fml.common.IWorldGenerator;
  6. import cpw.mods.fml.common.Mod;
  7. import cpw.mods.fml.common.Mod.EventHandler;
  8. import cpw.mods.fml.common.Mod.Instance;
  9. import cpw.mods.fml.common.SidedProxy;
  10. import cpw.mods.fml.common.event.FMLInitializationEvent;
  11. import cpw.mods.fml.common.event.FMLPostInitializationEvent;
  12. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  13. import cpw.mods.fml.common.event.FMLServerStartingEvent;
  14. import cpw.mods.fml.common.registry.GameRegistry;
  15. import fr.kiwiofficiel.sumaria.proxy.CommonProxy;
  16. import net.minecraft.world.World;
  17. import net.minecraft.world.chunk.IChunkProvider;
  18.  
  19. @Mod(modid = "sumariamod", name = "Mod Sumaria", version = "1.0")
  20.  
  21. public class ModSumaria implements IWorldGenerator
  22. {
  23.    
  24.     public static final String MODID = "sumariamod";
  25.    
  26.     @Instance(MODID)
  27.     public static ModSumaria instance;
  28.    
  29.     sumariatabs sumariamod_00 = new sumariatabs();
  30.      adamine sumariamod_0 = new adamine();
  31.      adamine_ore sumariamod_01 = new adamine_ore();
  32.      rhodonite sumariamod_1 = new rhodonite();
  33.      rhodonite_ore sumariamod_11 = new rhodonite_ore();
  34.      jaspe sumariamod_2 = new jaspe();
  35.      wulfenite sumariamod_3 = new wulfenite();
  36.      
  37.    
  38.     @SidedProxy(clientSide = "fr.kiwiofficiel.sumaria.proxy.ClientProxy", serverSide = "fr.kiwiofficiel.sumaria.proxy.CommonProxy")
  39.     public static CommonProxy proxy;
  40.    
  41.     @EventHandler
  42.     public void serverLoad(FMLServerStartingEvent event) {
  43.         sumariamod_01.serverLoad(event);
  44.         sumariamod_11.serverLoad(event);
  45.     }
  46.    
  47.     @EventHandler
  48.     public void load(FMLInitializationEvent event) {
  49.         GameRegistry.registerWorldGenerator(this, 1);
  50.     }
  51.    
  52.    
  53.     @EventHandler
  54.     public void preInit(FMLPreInitializationEvent event) {
  55.         System.out.println("pre initialisation");
  56.         sumariamod_00.instance = this.instance;
  57.         sumariamod_00.preInit(event);
  58.         sumariamod_0.instance = this.instance;
  59.         sumariamod_0.preInit(event);
  60.         sumariamod_01.instance = this.instance;
  61.         sumariamod_01.preInit(event);
  62.         sumariamod_1.instance = this.instance;
  63.         sumariamod_1.preInit(event);
  64.         sumariamod_11.instance = this.instance;
  65.         sumariamod_11.preInit(event);
  66.         sumariamod_2.instance = this.instance;
  67.         sumariamod_2.preInit(event);
  68.         sumariamod_3.instance = this.instance;
  69.         sumariamod_3.preInit(event);
  70.     }
  71.    
  72.     @EventHandler
  73.     public void Init(FMLInitializationEvent event) {
  74.         System.out.println("initialisation");
  75.         sumariamod_01.instance = this.instance;
  76.         sumariamod_11.instance = this.instance;
  77.        
  78.         proxy.registerRender();
  79.     }
  80.    
  81.     @EventHandler
  82.     public void postInit(FMLPostInitializationEvent event) {
  83.         System.out.println("initialisation Ok");
  84.     }
  85.    
  86.     public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
  87.  
  88.         chunkX = chunkX * 16;
  89.         chunkZ = chunkZ * 16;
  90.         if (world.provider.dimensionId == -1)
  91.             sumariamod_01.generateNether(world, random, chunkX, chunkZ);
  92.         if (world.provider.dimensionId == 0)
  93.             sumariamod_01.generateSurface(world, random, chunkX, chunkZ);
  94.     }
  95.  
  96. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top