Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

1.7.2 Generation


zacharyjaiden
 Share

Recommended Posts

ive created crops for my mod and think its too easy to just get seeds from grass, i want to generate a plant randomly similar to dead shrubs and ferns in specific biomes (the plant would be a plant version of my crop that drops A seed or something)

 

i googled and didnt find any tutorials on anything other than ore generation which i already know, is anyone able to point me in the right direction and or help me out with this ??

Link to comment
Share on other sites

ive created crops for my mod and think its too easy to just get seeds from grass, i want to generate a plant randomly similar to dead shrubs and ferns in specific biomes (the plant would be a plant version of my crop that drops A seed or something)

 

i googled and didnt find any tutorials on anything other than ore generation which i already know, is anyone able to point me in the right direction and or help me out with this ??

 

Have you already watched this tutorial?

 

Here could be your advertisement!

Link to comment
Share on other sites

Just look at the source code for the Minecraft generator. You can learn a ton of stuff from the source code.

if (user.hasKnowledgeOfJava) {

    if (user.question.hasCode) {

        return interpetHelpfulResponse(user.getQuestion());

    } else {

        return "Could you post your code please?";

    }

} else {

    return "Learn some freaking Java!";

}

Link to comment
Share on other sites

thanks for the link but that was a link to creating the flower block itself with i already had, i need to generate it, from what ive gathered i need to use the biome decorator, my questions are:

 

what class should i extend to use biome decorator? should i extend biome decorator itself or IworldGenerator (like i did with my ores) or World generator like with a tree or what, BiomeGenBase im not sure where to start off my file...

 

(Im a noob when it comes to all generation apart from ore)

Link to comment
Share on other sites

The reason he linked you a flower tutorial is because flower generation is very pertinent to your needs. You can use WorldGenFlowers directly if you want (mushrooms do this), or you can create your own class that extends WorldGenerator.

 

In either case, you can use the DecorateBiomeEvents to generate using your world generator of choice:

 

// EVENT_BUS event
@SubscribeEvent
public void onDecorate(DecorateBiomeEvent.Post event) {
// determine coordinates and generate
}

 

You may want to take a look here to see some difficulties you may encounter (the infamous "already decorating!").

Link to comment
Share on other sites

okay thats kinda what i was looking for a place to start, (what to extend) i think flowers is a good option as i dont need anything special to happen i just need these bushes to randomly spawn like flowers... but do you mean to say that event can be used in conjunction with the the generator or can be used in replace of the generator for what i need to do

Link to comment
Share on other sites

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

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.