Jump to content

Recommended Posts

Posted

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? :D

I'll be glad if anybody would help me.

Posted

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...

Posted

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.

Posted

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.

Posted

        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.

Posted

I've tried doing that. It says that "The method registerWorldGenerator(IWorldGenerator) in the type GameRegistry is not applicable for the arguments (WorldGenLithium)"

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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.

Posted

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)

Posted

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?

Posted

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.

Posted

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.

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.