Advertisement
Guest User

Untitled

a guest
Mar 31st, 2013
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 13.26 KB | None | 0 0
  1. org.gudenau.storage.Storage{
  2. package org.gudenau.storage;
  3.  
  4. import java.io.File;
  5. import java.io.IOException;
  6. import java.util.logging.Logger;
  7.  
  8. import org.gudenau.common.Common;
  9. import org.gudenau.common.model.ObjModel;
  10. import org.gudenau.storage.block.Shelf;
  11. import org.gudenau.storage.item.ShelfItem;
  12. import org.gudenau.storage.render.BookShelfRenderer;
  13. import org.gudenau.storage.tile.BookShelfTile;
  14.  
  15. import net.minecraft.block.Block;
  16. import net.minecraftforge.client.MinecraftForgeClient;
  17. import net.minecraftforge.common.Configuration;
  18. import cpw.mods.fml.client.registry.ClientRegistry;
  19. import cpw.mods.fml.common.Mod;
  20. import cpw.mods.fml.common.Mod.Init;
  21. import cpw.mods.fml.common.event.FMLInitializationEvent;
  22. import cpw.mods.fml.common.network.NetworkMod;
  23. import cpw.mods.fml.common.registry.GameRegistry;
  24.  
  25. @Mod(modid = "gudStorage", name="gudenau Storage", dependencies="after:gudCommon")
  26. @NetworkMod
  27. public class Storage {
  28.  
  29.     private Configuration config;
  30.    
  31.     private static ShelfItem shelfItem;
  32.    
  33.     private static Shelf shelf;
  34.    
  35.     private Logger logger = Common.instance.getLogger("gudStorage");
  36.    
  37.     @Init
  38.     public void init(FMLInitializationEvent event){
  39.         log("gudStorage is loading...");
  40.        
  41.         config = new Configuration(new File("config/gudenau/Shelf.cfg"));
  42.         config.load();
  43.        
  44.         createBlocks();
  45.         createItems();
  46.         registerTiles();
  47.        
  48.         config.save();
  49.        
  50.         log("gudStorage has loaded!");
  51.     }
  52.    
  53.     private void createBlocks(){
  54.         shelf = new Shelf(config.getBlock("shelf", 500).getInt());
  55.         GameRegistry.registerBlock(shelf);
  56.     }
  57.    
  58.     private void registerTiles(){
  59.         GameRegistry.registerTileEntity(BookShelfTile.class, "gudBookShelfTile");
  60.         ClientRegistry.bindTileEntitySpecialRenderer(BookShelfTile.class, new BookShelfRenderer());
  61.     }
  62.    
  63.     private void createItems(){
  64.         shelfItem = new ShelfItem(config.getItem("shelf", 20012).getInt());
  65.     }
  66.  
  67.     public static ShelfItem getShelfItem() {
  68.         return shelfItem;
  69.     }
  70.    
  71.     public void log(String log){
  72.         logger.info(log);
  73.     }
  74.    
  75.     public void warn(String warrning){
  76.         logger.warning(warrning);
  77.     }
  78.    
  79.     public void error(String error){
  80.         logger.severe(error);
  81.     }
  82. }
  83.  
  84. }
  85.  
  86. org.gudenau.common.Common{
  87. package org.gudenau.common;
  88.  
  89. import java.util.logging.Logger;
  90.  
  91. import cpw.mods.fml.common.FMLLog;
  92. import cpw.mods.fml.common.Mod;
  93. import cpw.mods.fml.common.Mod.Init;
  94. import cpw.mods.fml.common.Mod.Instance;
  95. import cpw.mods.fml.common.Mod.PreInit;
  96. import cpw.mods.fml.common.event.FMLInitializationEvent;
  97. import cpw.mods.fml.common.event.FMLPreInitializationEvent;
  98.  
  99. @Mod(modid = "gudCommon")
  100. public class Common {
  101.  
  102.     private Logger gudLogger;
  103.  
  104.     @Instance(value = "gudCommon")
  105.     public static Common instance;
  106.  
  107.     @PreInit
  108.     public void preload(FMLPreInitializationEvent event){
  109.         instance = this;
  110.  
  111.         System.out.println("\n\n\n\n\n\n\n\n\n");
  112.        
  113.         gudLogger = Logger.getLogger("gudCommon");
  114.         gudLogger.setParent(FMLLog.getLogger());
  115.     }
  116.    
  117.     @Init
  118.     public void load(FMLInitializationEvent event) {
  119.  
  120.         log("gudCommon is loading...");
  121.  
  122.         log("gudCommon has loaded!");
  123.     }
  124.  
  125.     public void log(String log) {
  126.         gudLogger.info(log);
  127.     }
  128.  
  129.     public void warn(String warrning) {
  130.         gudLogger.warning(warrning);
  131.     }
  132.  
  133.     public void error(String error) {
  134.         gudLogger.severe(error);
  135.     }
  136.  
  137.     public Logger getLogger(String logger) {
  138.         log("Creating logger " + logger + " from gudLogger");
  139.  
  140.         Logger tmp = Logger.getLogger(logger);
  141.         tmp.setParent(FMLLog.getLogger());
  142.         return tmp;
  143.     }
  144. }
  145. }
  146.  
  147. Log{
  148. 2013-03-31 09:40:52 [INFO] [ForgeModLoader] Forge Mod Loader version 5.1.10.620 for Minecraft 1.5.1 loading
  149. 2013-03-31 09:40:52 [INFO] [ForgeModLoader] Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_17, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
  150. 2013-03-31 09:40:52 [INFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
  151. 2013-03-31 09:40:54 [INFO] [STDOUT] 229 recipes
  152. 2013-03-31 09:40:54 [INFO] [STDOUT] 27 achievements
  153. 2013-03-31 09:40:54 [INFO] [Minecraft-Client] Setting user: Player128
  154. 2013-03-31 09:40:54 [INFO] [STDOUT] (Session ID is -)
  155. 2013-03-31 09:40:54 [INFO] [STDERR] Client asked for parameter: server
  156. 2013-03-31 09:40:54 [INFO] [Minecraft-Client] LWJGL Version: 2.4.2
  157. 2013-03-31 09:40:54 [INFO] [MinecraftForge] Attempting early MinecraftForge initialization
  158. 2013-03-31 09:40:54 [INFO] [STDOUT] MinecraftForge v7.7.1.620 Initialized
  159. 2013-03-31 09:40:54 [INFO] [ForgeModLoader] MinecraftForge v7.7.1.620 Initialized
  160. 2013-03-31 09:40:54 [INFO] [STDOUT] Replaced 85 ore recipies
  161. 2013-03-31 09:40:54 [INFO] [MinecraftForge] Completed early MinecraftForge initialization
  162. 2013-03-31 09:40:54 [INFO] [ForgeModLoader] Reading custom logging properties from C:\Users\Alec\Desktop\mcp\jars\config\logging.properties
  163. 2013-03-31 09:40:54 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL
  164. 2013-03-31 09:40:55 [INFO] [ForgeModLoader] Searching C:\Users\Alec\Desktop\mcp\jars\mods for mods
  165. 2013-03-31 09:40:55 [INFO] [gudCommon] Mod gudCommon is missing the required element 'name'. Substituting gudCommon
  166. 2013-03-31 09:40:55 [WARNING] [gudCommon] Mod gudCommon is missing the required element 'version' and no fallback can be found. Substituting '1.0'.
  167. 2013-03-31 09:40:55 [WARNING] [gudStorage] Mod gudStorage is missing the required element 'version' and no fallback can be found. Substituting '1.0'.
  168. 2013-03-31 09:40:55 [INFO] [ForgeModLoader] Forge Mod Loader has identified 7 mods to load
  169. 2013-03-31 09:40:55 [INFO] [mcp] Activating mod mcp
  170. 2013-03-31 09:40:55 [INFO] [FML] Activating mod FML
  171. 2013-03-31 09:40:55 [INFO] [Forge] Activating mod Forge
  172. 2013-03-31 09:40:55 [INFO] [gudCommon] Activating mod gudCommon
  173. 2013-03-31 09:40:55 [INFO] [gudStorage] Activating mod gudStorage
  174. 2013-03-31 09:40:55 [INFO] [CCTurtle] Activating mod CCTurtle
  175. 2013-03-31 09:40:55 [INFO] [ComputerCraft] Activating mod ComputerCraft
  176. 2013-03-31 09:40:56 [SEVERE] [ForgeModLoader] Fatal errors were detected during the transition from CONSTRUCTING to PREINITIALIZATION. Loading cannot continue
  177. 2013-03-31 09:40:56 [SEVERE] [ForgeModLoader]
  178.     mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
  179.     FML [Forge Mod Loader] (coremods) Unloaded->Constructed
  180.     Forge [Minecraft Forge] (coremods) Unloaded->Constructed
  181.     gudCommon [gudCommon] (bin) Unloaded->Constructed
  182.     gudStorage [gudenau Storage] (bin) Unloaded->Errored
  183.     ComputerCraft [ComputerCraft] (ComputerCraft1.52.zip) Unloaded->Constructed
  184.     CCTurtle [ComputerCraft Turtles] (ComputerCraft1.52.zip) Unloaded->Constructed
  185. 2013-03-31 09:40:56 [SEVERE] [ForgeModLoader] The following problems were captured during this phase
  186. 2013-03-31 09:40:56 [SEVERE] [ForgeModLoader] Caught exception from gudStorage
  187. java.lang.NullPointerException
  188.     at org.gudenau.common.Common.log(Common.java:40)
  189.     at org.gudenau.common.Common.getLogger(Common.java:52)
  190.     at org.gudenau.storage.Storage.<init>(Storage.java:34)
  191.     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  192.     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  193.     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  194.     at java.lang.reflect.Constructor.newInstance(Unknown Source)
  195.     at java.lang.Class.newInstance0(Unknown Source)
  196.     at java.lang.Class.newInstance(Unknown Source)
  197.     at cpw.mods.fml.common.FMLModContainer$JavaAdapter.getNewInstance(FMLModContainer.java:129)
  198.     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:487)
  199.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  200.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  201.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  202.     at java.lang.reflect.Method.invoke(Unknown Source)
  203.     at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
  204.     at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
  205.     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
  206.     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
  207.     at com.google.common.eventbus.EventBus.post(EventBus.java:267)
  208.     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
  209.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  210.     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  211.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  212.     at java.lang.reflect.Method.invoke(Unknown Source)
  213.     at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
  214.     at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
  215.     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
  216.     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
  217.     at com.google.common.eventbus.EventBus.post(EventBus.java:267)
  218.     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
  219.     at cpw.mods.fml.common.Loader.loadMods(Loader.java:502)
  220.     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160)
  221.     at net.minecraft.client.Minecraft.startGame(Minecraft.java:407)
  222.     at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
  223.     at net.minecraft.client.Minecraft.run(Minecraft.java:729)
  224.     at java.lang.Thread.run(Unknown Source)
  225. 2013-03-31 09:40:56 [INFO] [STDERR] java.lang.NullPointerException
  226. 2013-03-31 09:40:56 [INFO] [STDERR]     at org.gudenau.common.Common.log(Common.java:40)
  227. 2013-03-31 09:40:56 [INFO] [STDERR]     at org.gudenau.common.Common.getLogger(Common.java:52)
  228. 2013-03-31 09:40:56 [INFO] [STDERR]     at org.gudenau.storage.Storage.<init>(Storage.java:34)
  229. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  230. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  231. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  232. 2013-03-31 09:40:56 [INFO] [STDERR]     at java.lang.reflect.Constructor.newInstance(Unknown Source)
  233. 2013-03-31 09:40:56 [INFO] [STDERR]     at java.lang.Class.newInstance0(Unknown Source)
  234. 2013-03-31 09:40:56 [INFO] [STDERR]     at java.lang.Class.newInstance(Unknown Source)
  235. 2013-03-31 09:40:56 [INFO] [STDERR]     at cpw.mods.fml.common.FMLModContainer$JavaAdapter.getNewInstance(FMLModContainer.java:129)
  236. 2013-03-31 09:40:56 [INFO] [STDERR]     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:487)
  237. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  238. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  239. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  240. 2013-03-31 09:40:56 [INFO] [STDERR]     at java.lang.reflect.Method.invoke(Unknown Source)
  241. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
  242. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
  243. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
  244. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
  245. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventBus.post(EventBus.java:267)
  246. 2013-03-31 09:40:56 [INFO] [STDERR]     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
  247. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  248. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
  249. 2013-03-31 09:40:56 [INFO] [STDERR]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
  250. 2013-03-31 09:40:56 [INFO] [STDERR]     at java.lang.reflect.Method.invoke(Unknown Source)
  251. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
  252. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
  253. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
  254. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
  255. 2013-03-31 09:40:56 [INFO] [STDERR]     at com.google.common.eventbus.EventBus.post(EventBus.java:267)
  256. 2013-03-31 09:40:56 [INFO] [STDERR]     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
  257. 2013-03-31 09:40:56 [INFO] [STDERR]     at cpw.mods.fml.common.Loader.loadMods(Loader.java:502)
  258. 2013-03-31 09:40:56 [INFO] [STDERR]     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160)
  259. 2013-03-31 09:40:56 [INFO] [STDERR]     at net.minecraft.client.Minecraft.startGame(Minecraft.java:407)
  260. 2013-03-31 09:40:56 [INFO] [STDERR]     at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)
  261. 2013-03-31 09:40:56 [INFO] [STDERR]     at net.minecraft.client.Minecraft.run(Minecraft.java:729)
  262. 2013-03-31 09:40:56 [INFO] [STDERR]     at java.lang.Thread.run(Unknown Source)
  263. 2013-03-31 09:41:05 [INFO] [STDERR] Someone is closing me!
  264. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement