Posted October 20, 201311 yr Hello, I know some stuff in Java, but I need help with world gen. I would really like to generate my block like clay does. Could anybody help me? I'll be glad if anybody would help me.
October 21, 201311 yr then look at clays world gen and modify to how you want. Creator of Jobo's ModLoader If I helped you could you please click the thank you button and applaud my karma.
October 21, 201311 yr Author I tried that, the only problem is that there were some errors which I couldn't fix however I tried.
October 21, 201311 yr We may be able to help you with those, but then we will need you to paste your code files into paste.minecraftforge.net and give us the link(s) As well as giving us the error it shows in eclipse If you guys dont get it.. then well ya.. try harder...
October 21, 201311 yr This may be helpful (note: several things are going on in that class, quicksand is the only one you need to look at). I'm not sure that clay uses WorldGenLakes(...) but it probably uses something close. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 21, 201311 yr Author Here's the main mod file: (I've removed all the blocks that aren't important) http://paste.minecraftforge.net/view/cade39d3 Here's the Lithium Clay code: http://paste.minecraftforge.net/view/e92fcf86 And finally here's the Lithium Clay Item code: http://paste.minecraftforge.net/view/d41fef46 The WorldGen file is basicly the same as WorldGenClay (only with modified block ids) http://paste.minecraftforge.net/view/834e1813 The problem is that I need to somehow define it in the main mod code for it to load up the WorldGenLithium file.
October 21, 201311 yr worldGen = new WorldGenLithium (someVal); GameRegistry.registerWorldGenerator(worldGen); Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 21, 201311 yr Author I've tried doing that. It says that "The method registerWorldGenerator(IWorldGenerator) in the type GameRegistry is not applicable for the arguments (WorldGenLithium)"
October 21, 201311 yr Then implement IWorldGenerator rather than extending WorldGenerator Note: That will probably cause errors, which you will need to fix, but the bulk of what you want to happen will remain constant. You'll probably just end up retyping a variable or method name. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 21, 201311 yr Author I tried implementing IWorldGenerator, but then it want's to add unimplemented methods. I add the "public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)" method and then I get completely stuck. I don't know what am I supposed to do. I'll give a cookie to someone who helps me with this.
October 21, 201311 yr Uh huh. You add the unimplemented methods, the move the code that exists in the methods you have into those methods. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 21, 201311 yr return true/false; -> return; Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 21, 201311 yr Author I don't know what to change the par3, par4 and par5 to. http://paste.minecraftforge.net/view/54713356
October 21, 201311 yr They are used as world coordinates in your code, obviously. chunkX and chunkZ are the chunk coordinates, so you can easily go from there.
October 21, 201311 yr par3/4/5 are an XYZ block location. IWorldGenerator passes a chunkX and chunkZ (so cX of 10 = world location of 160). You'll have to calculate Y manually. See this class for an example. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 22, 201311 yr Author Sorry to still bother you, but I just can't figure it out. My code looks something like this: http://paste.minecraftforge.net/view/cb33f6b2 And it's still not generating.
October 22, 201311 yr Author WOO! Somehow figured it out by myself Just had to change it, so it generates in sand, not in dirt Ok, so now I've got a different problem... It only generates once in the world (around spawn)
October 22, 201311 yr Author I've got idea. I could somehow go around the generation and somehow randomly replace generated Clay in the world. Is there any way to randomly replace blocks with chance in the world?
October 22, 201311 yr Take a look at my IWorldGenerator class again. Specifically the ch variable. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 22, 201311 yr Author Thank you for your help, but now I'm actually looking for a way to randomly replace blocks in the world with chance.
October 22, 201311 yr You would need to poll the chunk for those blocks (see my "locate stronghold" code) then perform a replacement if the RNG says so. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 22, 201311 yr Author I'm afraid that I'll need a code for that. How I said, I'm not that good in Java
October 22, 201311 yr Same class I've linked like three times. Lines 84-122. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
October 22, 201311 yr Author Oh, I am so sorry for bothering you. I just realized I commented out "WorldGenLithium worldGen = new WorldGenLithium();" But really, thank you for your help
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.