Posted July 22, 201411 yr 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
July 23, 201411 yr 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.
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.