Posted July 31, 201510 yr Hello there, I am having trouble with my ore generation class. Whenever I create a new world, the game crashes. OreGenerator class code can be found at http://pastebin.com/7YyxbN80 Crash report can be found at http://pastebin.com/13neAut7
July 31, 201510 yr Hi Generic.testoniumOre is probably null? In case you're just starting out, this link is very helpful for learning how to debug null pointer exceptions http://www.terryanderson.ca/debugging/run.html -TGG
August 1, 201510 yr Author Changed "public static Block testoniumOre;" in my main class to "public static Block testoniumOre = new TestoniumOre(0, Material.rock);", and instead of my expected testonium ore spawning, I get chunks of air spawning underground, but at least it isn't throwing null pointer exceptions anymore.
August 1, 201510 yr Author Moved "GameRegistry.registerBlock(testoniumBlock, "testoniumBlock");" from Init to preInit, and then the game crashes http://pastebin.com/jaucqbp4
August 2, 201510 yr Author Thank you very much for that information! Cleaning up my code and removing "final Block" from all instances in which it appeared seemed to do the trick. Testonium ore is spawning like usual.
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.