Jump to content

Tool that creates a NPC village


MikeZ

Recommended Posts

Hi!

I want to make a new tool, that if it get's right clicked creates a village.

I know that the Minecraft Class for the Village is this:

net.minecraft.world.gen.structure.MapGenVillage.class

 

But how can I make the Tool like that, that if it get's right clicked theres a new village?

 

Thanks,

Mike

Link to comment
Share on other sites

I'm inclined to believe that generation begins with

    public void func_151539_a(IChunkProvider p_151539_1_, World p_151539_2_, int p_151539_3_, int p_151539_4_, Block[] p_151539_5_)

but clearly that method is intended for use while the world is first generating. I imagine that you could copy the chunks you want to spawn the village in into block arrays and then try generating using that method. I also suppose that you could world.setBlock any blocks that are changed in the block arrays. I don't really know what you would pass into IChunkProvider though. Perhaps a class that copies the chunks into block arrays?

 

It might be easier just to write your own code to generate a village though. No matter how you do it, generating a village outside of the world generation code strikes me as an ambitious proposition. If you were to write your own code I would recommend starting by creating items that spawn each individual structure. Then in your final item you could try to mimic the code used to decide where to place roads and structures inside a village.

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