Master1398 Posted April 4, 2013 Posted April 4, 2013 i need help!! Every time when i´m trying to use 2 of my Blocks as top and fillerblock i get an error! 2013-04-04 20:36:12 [iNFO] [MasterCraft] Activating mod MasterCraft 2013-04-04 20:36:12 [iNFO] [ForgeModLoader] FML has found a non-mod file MasterCraft.zip in your mods directory. It will now be injected into your classpath. This could severe stability issues, it should be removed if possible. 2013-04-04 20:36:12 [iNFO] [sTDERR] Exception in thread "Minecraft main thread" java.lang.ExceptionInInitializerError 2013-04-04 20:36:12 [iNFO] [sTDERR] at java.lang.Class.forName0(Native Method) 2013-04-04 20:36:12 [iNFO] [sTDERR] at java.lang.Class.forName(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at cpw.mods.fml.common.ProxyInjector.inject(ProxyInjector.java:50) 2013-04-04 20:36:12 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:492) 2013-04-04 20:36:12 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-04-04 20:36:12 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-04-04 20:36:12 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165) 2013-04-04 20:36:12 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 2013-04-04 20:36:12 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) 2013-04-04 20:36:12 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267) 2013-04-04 20:36:12 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98) 2013-04-04 20:36:12 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.loadMods(Loader.java:494) 2013-04-04 20:36:12 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160) 2013-04-04 20:36:12 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:407) 2013-04-04 20:36:12 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44) 2013-04-04 20:36:12 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729) 2013-04-04 20:36:12 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source) 2013-04-04 20:36:12 [iNFO] [sTDERR] Caused by: java.lang.NullPointerException 2013-04-04 20:36:12 [iNFO] [sTDERR] at MasterCraft.BiomeGenAitherMountain.<init>(BiomeGenAitherMountain.java:19) 2013-04-04 20:36:12 [iNFO] [sTDERR] at MasterCraft.Server.<clinit>(Server.java:33) 2013-04-04 20:36:12 [iNFO] [sTDERR] ... 30 more the error message and here what i use in my biomecode public BiomeGenAitherMountain(int par1) { super(par1); this.spawnableCreatureList.clear(); this.fillerBlock = (byte) Server.AitherDirt.blockID; this.theBiomeDecorator.grassPerChunk = 12; this.waterColorMultiplier = 500069595; } Quote
Senitiel Posted April 4, 2013 Posted April 4, 2013 First of all, study Your Ecplipse Console Output carefully to get what line causes the error - I cannot tell which line of Your code does it, as the code You've posted doesn't have line numbers. This could be this.spawnableCreatureList.clear(); if spawnableCreatureList is null, this will cause problem. this.fillerBlock = (byte) Server.AitherDirt.blockID; if Server or AitherDirt is null, this will cause problem this.theBiomeDecorator.grassPerChunk = 12; if theBiomeDecorator is null, this will cause problem. Every one of these fields needs to be initialized before You reference them - check which one of them isn't initialized before public BiomeGenAitherMountain is called and initialize it, with any values - this will fix Your problem. Quote http://imageshack.us/a/img707/2757/senitielsspacemarinemod.png[/img]
Master1398 Posted April 4, 2013 Author Posted April 4, 2013 what do you mean with null ? I now remove this.spawnableCreatureList.clear(); and this.theBiomeDecorator.grassPerChunk = 12; (the last one because it´s not really necessary Is this entry right in Server.class public final static Block_AitherDirt AitherDirt = new Block_AitherDirt(); GameRegistry.registerBlock(AitherDirt); What i have to change? Edit: Ok i have it know. It was so simple the whole time ._. Edit again: Now it won´t let me load a world Quote
robustus Posted April 8, 2013 Posted April 8, 2013 The block you put in filler or top block has to be an ID below 256 or else you will crash when generating Quote
Mazetar Posted April 8, 2013 Posted April 8, 2013 what do you mean with null ? Null is a basic programming term which you must look up and understand as its a common problem! Null is a value or well rather the lack of one, it's NOT to be confused with 0! Check it out on the web Quote If you guys dont get it.. then well ya.. try harder...
Mazetar Posted April 8, 2013 Posted April 8, 2013 The block you put in filler or top block has to be an ID below 256 or else you will crash when generating Could you elaborate? What is your source for saying this, as to me this sounds wrong I would like to know why it wouldnt handle block ids above 256? Quote If you guys dont get it.. then well ya.. try harder...
microjunk Posted April 8, 2013 Posted April 8, 2013 this has been discussed many times on the MinecraftForums....and the fact that (byte) is a reference of 256, it would stand to reason that block ids must be below 256 in order to be a top and filler block in the biome. I have done this, as has -reaper- and several others on the MCF. I have tested the theory manytimes and it only works when the block id is below that mark, it can be done, just mind your block ids, they are getting fewer and fewer with each MC update. It is hard coded in the MC code and can not be changed with out a custom way of doing it, and I have no idea how this would be done. Either way, for now, your block id must be below 256, and initialized before the biome you are trying to use the block in.....good luck and I hope it works out. Quote
robustus Posted April 9, 2013 Posted April 9, 2013 The block you put in filler or top block has to be an ID below 256 or else you will crash when generating Could you elaborate? What is your source for saying this, as to me this sounds wrong I would like to know why it wouldnt handle block ids above 256? As previous poster stated the filler and top blocks are Byte variables not integers, and the highest number block ID is 256 that will work with the terrain gen. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.