Guest User

Config

a guest
Dec 14th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 7.52 KB | None | 0 0
  1. package com.nightmarecreatures.main;
  2.  
  3. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  4. import net.minecraftforge.common.config.Configuration;
  5.  
  6. public class Config {
  7.  
  8.     public static int basespawn;
  9.    
  10.     public static int hollowspawnrate;
  11.     public static int mulrogspawnrate;
  12.     public static int shalrogspawnrate;
  13.     public static int lesserbalrogspawnrate;
  14.     public static int skulkerspawnrate;
  15.     public static int jakkerspawnrate;
  16.     public static int kogulspawnrate;
  17.     public static int phantasmspawnrate;
  18.     public static int shudimspawnrate;
  19.     public static int hauntspawnrate;
  20.     public static int walkingnestspawnrate;
  21.     public static int driderspawnrate;
  22.     public static int werskspawnrate;
  23.    
  24.     public static int hellmultiplier;
  25.    
  26.     public static int hollowID;
  27.     public static int mulrogID;
  28.     public static int shalrogID;
  29.     public static int lesserbalrogID;
  30.     public static int skulkerID;
  31.     public static int jakkerID;
  32.     public static int kogulID;
  33.     public static int kogulruntID;
  34.     public static int phantasmID;
  35.     public static int shudimID;
  36.     public static int hauntID;
  37.     public static int walkingnestID;
  38.     public static int spiderlingID;
  39.     public static int driderID;
  40.     public static int werskID;
  41.     public static int wersklingID;
  42.    
  43.     public static int egghollowID;
  44.     public static int eggmulrogID;
  45.     public static int eggshalrogID;
  46.     public static int egglesserbalrogID;
  47.     public static int eggskulkerID;
  48.     public static int eggjakkerID;
  49.     public static int eggkogulID;
  50.     public static int eggkogulruntID;
  51.     public static int eggphantasmID;
  52.     public static int eggshudimID;
  53.     public static int egghauntID;
  54.     public static int eggwalkingnestID;
  55.     public static int eggspiderlingID;
  56.     public static int eggdriderID;
  57.     public static int eggwerskID;
  58.     public static int eggwersklingID;
  59.    
  60.     public static void preinit(FMLPreInitializationEvent event)
  61.     {
  62.         Configuration config = new Configuration(event.getSuggestedConfigurationFile());
  63.         config.load();
  64.        
  65.        
  66.         config.setCategoryComment(Configuration.CATEGORY_GENERAL, "The spawn weight values are multiplied by the base spawn weight for all mobs. \n"
  67.                                                                 + "The hell multiplier is used to multiply the spawns of certain mobs in the nether. \n"
  68.                                                                 + "The value range for individual spawn wieghts is 0-100 inclusive.");
  69.        
  70.         basespawn = config.getInt("Base Spawn Weight: ", Configuration.CATEGORY_GENERAL, 10, 0, 100, "The minimum value is 0 and the maximum is 100.");
  71.        
  72.         hollowspawnrate = config.getInt("Hollow Spawn Weight: ", Configuration.CATEGORY_GENERAL, 8, 0, 10, "");
  73.         mulrogspawnrate = config.getInt("Mulrog Spawn Weight: ", Configuration.CATEGORY_GENERAL, 4, 0, 100, "");
  74.         shalrogspawnrate = config.getInt("Shalrog Spawn Weight: ", Configuration.CATEGORY_GENERAL, 3, 0, 100, "");
  75.         lesserbalrogspawnrate = config.getInt("Wersk Spawn Weight: ", Configuration.CATEGORY_GENERAL, 2, 0, 100, "");
  76.         skulkerspawnrate = config.getInt("Skulker Spawn Weight: ", Configuration.CATEGORY_GENERAL, 8, 0, 100, "");
  77.         jakkerspawnrate = config.getInt("Jakker Spawn Weight: ", Configuration.CATEGORY_GENERAL, 7, 0, 100, "");
  78.         kogulspawnrate = config.getInt("Kogul Spawn Weight: ", Configuration.CATEGORY_GENERAL, 6, 0, 100, "");
  79.         phantasmspawnrate = config.getInt("Phantasm Spawn Weight: ", Configuration.CATEGORY_GENERAL, 4, 0, 100, "");
  80.         shudimspawnrate = config.getInt("Shudim Spawn Weight: ", Configuration.CATEGORY_GENERAL, 3, 0, 100, "");
  81.         hauntspawnrate = config.getInt("Haunt Spawn Weight: ", Configuration.CATEGORY_GENERAL, 2, 0, 100, "");
  82.         walkingnestspawnrate = config.getInt("Walking Nest Spawn Weight: ", Configuration.CATEGORY_GENERAL, 7, 0, 100, "");
  83.         driderspawnrate = config.getInt("Drider Spawn Weight: ", Configuration.CATEGORY_GENERAL, 6, 0, 100, "");
  84.         werskspawnrate = config.getInt("Wersk Spawn Weight: ", Configuration.CATEGORY_GENERAL, 7, 0, 100, "");
  85.        
  86.         hellmultiplier = config.getInt("Hell Multiplier: ", Configuration.CATEGORY_GENERAL, 2, 1, 3, "The minimum value is 1 and the maximum is 3.");
  87.        
  88.        
  89.         config.setCategoryComment(Configuration.CATEGORY_GENERAL, "These will determine the ids for the mobs. The maximum value is 2000");
  90.        
  91.         hollowID = config.getInt("Hollow ID: ", Configuration.CATEGORY_GENERAL, 0, 0, 2000, "");
  92.         mulrogID = config.getInt("Mulrog ID: ", Configuration.CATEGORY_GENERAL, 1, 0, 2000, "");
  93.         shalrogID = config.getInt("Shalrog ID: ", Configuration.CATEGORY_GENERAL, 2, 0, 2000, "");
  94.         lesserbalrogID = config.getInt("Lesser Balrog ID: ", Configuration.CATEGORY_GENERAL, 3, 0, 2000, "");
  95.         skulkerID = config.getInt("Skulker ID: ", Configuration.CATEGORY_GENERAL, 4, 0, 2000, "");
  96.         jakkerID = config.getInt("Jakker ID: ", Configuration.CATEGORY_GENERAL, 5, 0, 2000, "");
  97.         kogulID = config.getInt("Kogul ID: ", Configuration.CATEGORY_GENERAL, 6, 0, 2000, "");
  98.         kogulruntID = config.getInt("Kogul ID: ", Configuration.CATEGORY_GENERAL, 7, 0, 2000, "");
  99.         phantasmID = config.getInt("Phantasm ID: ", Configuration.CATEGORY_GENERAL, 8, 0, 2000, "");
  100.         shudimID = config.getInt("Shudim ID: ", Configuration.CATEGORY_GENERAL, 9, 0, 2000, "");
  101.         hauntID = config.getInt("Haunt ID: ", Configuration.CATEGORY_GENERAL, 10, 0, 2000, "");
  102.         walkingnestID = config.getInt("Walking Nest ID: ", Configuration.CATEGORY_GENERAL, 11, 0, 2000, "");
  103.         spiderlingID = config.getInt("Spiderling ID: ", Configuration.CATEGORY_GENERAL, 12, 0, 2000, "");
  104.         driderID = config.getInt("Drider ID: ", Configuration.CATEGORY_GENERAL, 13, 0, 2000, "");
  105.         werskID = config.getInt("Wersk ID: ", Configuration.CATEGORY_GENERAL, 14, 0, 2000, "");
  106.         wersklingID = config.getInt("Werskling ID: ", Configuration.CATEGORY_GENERAL, 15, 0, 2000, "");
  107.        
  108.        
  109.         config.setCategoryComment(Configuration.CATEGORY_GENERAL, "These determine the item IDs for spawn eggs. The maximum value is 2000.");
  110.        
  111.         egghollowID = config.getInt("Hollow ID: ", Configuration.CATEGORY_GENERAL, 600, 0, 2000, "");
  112.         eggmulrogID = config.getInt("Mulrog ID: ", Configuration.CATEGORY_GENERAL, 601, 0, 2000, "");
  113.         eggshalrogID = config.getInt("Shalrog ID: ", Configuration.CATEGORY_GENERAL, 602, 0, 2000, "");
  114.         egglesserbalrogID = config.getInt("Lesser Balrog ID: ", Configuration.CATEGORY_GENERAL, 603, 0, 2000, "");
  115.         eggskulkerID = config.getInt("Skulker ID: ", Configuration.CATEGORY_GENERAL, 604, 0, 2000, "");
  116.         eggjakkerID = config.getInt("Jakker ID: ", Configuration.CATEGORY_GENERAL, 605, 0, 2000, "");
  117.         eggkogulID = config.getInt("Kogul ID: ", Configuration.CATEGORY_GENERAL, 606, 0, 2000, "");
  118.         eggkogulruntID = config.getInt("Kogul ID: ", Configuration.CATEGORY_GENERAL, 607, 0, 2000, "");
  119.         eggphantasmID = config.getInt("Phantasm ID: ", Configuration.CATEGORY_GENERAL, 608, 0, 2000, "");
  120.         eggshudimID = config.getInt("Shudim ID: ", Configuration.CATEGORY_GENERAL, 609, 0, 2000, "");
  121.         egghauntID = config.getInt("Haunt ID: ", Configuration.CATEGORY_GENERAL, 610, 0, 2000, "");
  122.         eggwalkingnestID = config.getInt("Walking Nest ID: ", Configuration.CATEGORY_GENERAL, 611, 0, 2000, "");
  123.         eggspiderlingID = config.getInt("Spiderling ID: ", Configuration.CATEGORY_GENERAL, 612, 0, 2000, "");
  124.         eggdriderID = config.getInt("Drider ID: ", Configuration.CATEGORY_GENERAL, 613, 0, 2000, "");
  125.         eggwerskID = config.getInt("Wersk ID: ", Configuration.CATEGORY_GENERAL, 614, 0, 2000, "");
  126.         eggwersklingID = config.getInt("Werskling ID: ", Configuration.CATEGORY_GENERAL, 615, 0, 2000, "");
  127.        
  128.        
  129.         config.save();
  130.     }
  131.    
  132. }
Advertisement
Add Comment
Please, Sign In to add comment