Hi there,I have started to work on a mod making Towns, a modified version of villages. You can find the original topic here. I do not change the villages, and rather makes a whole new type of dwelling place for villagers Schematics are being done, I guess I will have to turn them into Java or a text file, I'm not sure yet.
My main problem here is that I don't know where to start, as in, randomly find a new place to add a town (its well at the very least).I noticed while browsing the files that Net.World.Gen.ChunkProviderGenerate has MapGenVillage and MapGenScatteredFeature variables. I don't know how to use these more than reckon they simply are.
If any of you could direct me to a way to randomly find a spot on the map without modifying the ChunkProviderGenerate class itself, I will be very happy!
You can do it the same way people find random chunks and add ore generation I'd recommend checking out wuppy's tutorials, specifically the ones for generating ore and random structures. The relevant tutorials are for 1.3.2, but they still work for 1.6.4 (may need a few modifications, but I don't recall having to do any).
Generating structure is not so easy if you have a look a how villages are spawned you will see that it's quiet complicated.
First you have to calculate a spot if you need random generation, then you draw a bounding box, get the average height to start.
At this moment you calculate a random number and type of pieces to place. You start with the well then the other pieces, roads, houses...
But each piece has to be build from blocks and you have to code this.
You don't just put ready made parts in the game, each block has to be placed one after the other.
Salut le suisse
I am conscious that it takes a lot of different parts to be added and that each are made of blocks to make a whole. This is why I am basing my mod on the village classes and my mind has difficulty to grasp the concept, but I'm getting there
I wish to use Schematics for buildings if possible, so if you know a good schematics interpreter It would be awesome
Ok I admit it I am really having a hard time with this but if somebody is inclined to help me person to person on that matter I would greatly appreciate it. I guess a way to do it would be for me to share the document on dropbox and we both work on the project.
If somebody can help me through this I will be super happy and you will be able to have your name with the mod
My main problem here is that I don't know where to start, as in, randomly find a new place to add a town (its well at the very least).I noticed while browsing the files that Net.World.Gen.ChunkProviderGenerate has MapGenVillage and MapGenScatteredFeature variables. I don't know how to use these more than reckon they simply are.
If any of you could direct me to a way to randomly find a spot on the map without modifying the ChunkProviderGenerate class itself, I will be very happy!
First you have to calculate a spot if you need random generation, then you draw a bounding box, get the average height to start.
At this moment you calculate a random number and type of pieces to place. You start with the well then the other pieces, roads, houses...
But each piece has to be build from blocks and you have to code this.
You don't just put ready made parts in the game, each block has to be placed one after the other.
I am conscious that it takes a lot of different parts to be added and that each are made of blocks to make a whole. This is why I am basing my mod on the village classes and my mind has difficulty to grasp the concept, but I'm getting there
I wish to use Schematics for buildings if possible, so if you know a good schematics interpreter It would be awesome
If somebody can help me through this I will be super happy and you will be able to have your name with the mod