First of all I'd like to point out that I'm not asking for help in any way. Also I may not be logging in again. Being that it has been some time since I last posted here, I have noticed many aggravating changes. Any who, for those looking for answers on ore gen and things of that nature. Really anyone looking to mod. Look in the base code first. Give it a real good look through, not just in the things you wish to mod or change, but at everything. Most often you will find anything you wish to do there is example code all over the place, it really is there.In the case of adding new things, just make sure it is all properly registered.
After looking around a bit, I still don't seen any mods involving the addition of new villages. I was working on one that did add several villages to the game, however many life altering events later and I finally have got back to finishing the mod, though its not to share, I am sorry, I will share the code that results in getting more than one village to generate. One reason I wont share the mod is I base edited the code which is frowned upon and its for personal reasons I even finished. I have lost all original portions of the code from years ago and had to start from scratch and it was for my son, whom is no longer with me.
There was another mod at the time called Diversity, by Budd, and if you can find his code on github, it is overly complicated to do what I am about to show you. It is not my code so I can not show you the link. Also it requires more than one class to simply load several villages. In forge, during minecraft 1.6.4 and below, not sure about recent You can only replace the mapgen files, not really add to them if adding the same thing. So, I was looking for the simple solution that would result in doing just this. And it is as follows, minus the loading of the new MapGenVillage, thats up to you how you want to do this. Though once you add the code to load replace the MapGenVillage, this goes in the new class
Create Your New MapGenVillage and copy the original changing the following bits
[code]
[code]public static class Start extends StructureStart
{
private boolean hasMoreThanTwoComponents;
public Start()
{
}
public Start(World worldIn, Random rand, int x, int z, int size)
{
super(x, z);
List<StructureVillagePieces.PieceWeight> list = StructureVillagePieces.getStructureVillageWeightedPieceList(rand, size);
StructureVillagePieces.Start structurevillagepieces$start = new StructureVillagePieces.Start(worldIn.getBiomeProvider(), 0, rand, (x << 4) + 2, (z << 4) + 2, list, size);
this.components.add(structurevillagepieces$start);
structurevillagepieces$start.buildComponent(structurevillagepieces$start, this.components, rand);
List<StructureComponent> list1 = structurevillagepieces$start.pendingRoads;
List<StructureComponent> list2 = structurevillagepieces$start.pendingHouses;
while (!list1.isEmpty() || !list2.isEmpty())
{
if (list1.isEmpty())
{
int i = rand.nextInt(list2.size());
StructureComponent structurecomponent = (StructureComponent)list2.remove(i);
structurecomponent.buildComponent(structurevillagepieces$start, this.components, rand);
}
else
{
int j = rand.nextInt(list1.size());
StructureComponent structurecomponent2 = (StructureComponent)list1.remove(j);
structurecomponent2.buildComponent(structurevillagepieces$start, this.components, rand);
}
}
this.updateBoundingBox();
int k = 0;
for (StructureComponent structurecomponent1 : this.components)
{
if (!(structurecomponent1 instanceof StructureVillagePieces.Road))
{
++k;
}
}
this.hasMoreThanTwoComponents = k > 2;
}[/code]
[/code]
You'll notice thats comes just before the boolean method isSizeable.....
change that to the start method from MapGenScattered Features and remove the code bits for generating the features to look like this
[code][/p]
[p]public static class Start extends StructureStart
{
public Start()
{
}[/p]
[p]public Start(World worldIn, Random random, int chunkX, int chunkZ)
{
this(worldIn, random, chunkX, chunkZ, worldIn.getBiomeGenForCoords(new BlockPos(chunkX * 16 + 8, 0, chunkZ * 16 + 8)));
}[/p]
[p]public Start(World worldIn, Random random, int chunkX, int chunkZ, Biome biomeIn)
{
super(chunkX, chunkZ);[/p]
[p]if (biomeIn != Biomes.JUNGLE && biomeIn != Biomes.JUNGLE_HILLS)
{
if (biomeIn == Biomes.SWAMPLAND)
{
}
else if (biomeIn != Biomes.DESERT && biomeIn != Biomes.DESERT_HILLS)
{
if (biomeIn == Biomes.ICE_PLAINS || biomeIn == Biomes.COLD_TAIGA)
{
}
}
else
{
}
}
else
{
}[/p]
[p]this.updateBoundingBox();
}
}[/p]
[p][/code]
Now, where those bits were, you will replace it with this...
[code][/p]
[p]List<StructureVillagePieces.PieceWeight> list = StructureVillagePieces.getStructureVillageWeightedPieceList(rand, size);
StructureVillagePieces.Start structurevillagepieces$start = new StructureVillagePieces.Start(worldIn.getBiomeProvider(), 0, rand, (x << 4) + 2, (z << 4) + 2, list, size);
this.components.add(structurevillagepieces$start);
structurevillagepieces$start.buildComponent(structurevillagepieces$start, this.components, rand);
List<StructureComponent> list1 = structurevillagepieces$start.pendingRoads;
List<StructureComponent> list2 = structurevillagepieces$start.pendingHouses;[/p]
[p]while (!list1.isEmpty() || !list2.isEmpty())
{
if (list1.isEmpty())
{
int i = rand.nextInt(list2.size());
StructureComponent structurecomponent = (StructureComponent)list2.remove(i);
structurecomponent.buildComponent(structurevillagepieces$start, this.components, rand);
}
else
{
int j = rand.nextInt(list1.size());
StructureComponent structurecomponent2 = (StructureComponent)list1.remove(j);
structurecomponent2.buildComponent(structurevillagepieces$start, this.components, rand);
}
}[/p]
[p]this.updateBoundingBox();
int k = 0;[/p]
[p]for (StructureComponent structurecomponent1 : this.components)
{
if (!(structurecomponent1 instanceof StructureVillagePieces.Road))
{
++k;
}
}[/p]
[p]this.hasMoreThanTwoComponents = k > 2;[/p]
[p][/code]
If you make those changes, and make sure the spawn array list at the top contains each biome represented at the start method. Using this will give you four villages total, and using the variance code for desert village you can change the same villages many times. However this will give you four distinct villages if you change the shape and style of each village structure. you can also add more than four, this just gets you started. Dont forget to resgister all the village pieces for each piece class. have fun
Sorry for the messy code blocks, it wasn't like that when I was making the tread
Okay so aside from some other issues I am having I would like to ask if anyone knows a good tutorial for creating a new block like planks with metadata for the other blocks. I seem to be having trouble getting the registering correct at the moment. Also what happened to the render manager for blocks? in 1.6.4 I had to create a new render ID for my custom furnace and things. Is that still the case. When I use the getRenderType in the block class It crashes. If I dont use it I get some other strange things happen but no texture. Also while that seems to be an issue I also have with a custom flower pot along with the meta does anyone have experience with flower pots?
I should point out that I cant seem to get eclipse to work on this laptop at all. I am have some personal life issues right now but am using a laptop for net access and my main box to code with. So let me know what code you wish to see and I can copy it over. Trying also to get it up to get hub.
I wont have time to look into it anytime soon, not till I finish up the first version of the remake of my mod, maybe a few days. An easy test would be to just set a few vanilla blocks and generate that and see if all is working, then Then at least you will know if youre on the right track. Until then hang in there. I created this tutorial out of necessity when I was doing world gen. There were no real tutorials at that point so I feel your pain honestly. Keep plugging away, youll get it. If not I should be done in a few days like I said then I will take a look okay. Could you link me to the tutorials you have used for this so far?
I need to do this in my mod, otherwise I have to create a whole new entity for each village type and would prefer not to have to do that. I have no idea how to create mobs of any kind.
That may be part of the issue, are you registering the world generator properly? I know there have been changes to the way some things have to be registered now. I have just begun to update and recreate my mod and as I am not doing world gen now, but mapgen instead I have not looked into that at all.
After some time away I have returned to modding and can say this, to a point this tutorial still works. Exceptions are, minecraft no longer uses block IDs, world.setBlock is not the correct way of doing this(though I may be wrong on that partially), and there are API tools for generating single structures using schematic files. After I finish recreating my mod, I plan to come back and remake a few of my tutorials, and this may or may not be one of them. I do apologize for this, however, your best bet is to try and modify or update coolAlias' structure generation tool as ultimately after making this tutorial that was what I had used for my previous generation in my builder mod. It is an excellent tool for creating single structures as it has hooks for just about anything youd want to add to it.
You are correct, I am trying to a new village types to the generation. The first and second part of your response I had already done and worked just fine for loading one village only. However, I tried the third part, and while there was no crash, there were also no generated villages. Were you able to get this to work for your mod this way? Perhaps I am missing something. Thank you for your response I will keep trying.
Hello fellow modders. I have been re working my old mod to do what I had originally intended and that is to naturally generate the new villages in the world. I have setup all the necessary classes and it works fine if I choose to only generate one village overriding the original mapgenvillage class. I have no issues with this to this end. However, I do not wish to only generate one new village type. In addition to the normal minecraft village, I would like several other village types to generate as well. I have not seen any other examples of this being done with exception of a WIP mod that uses an overly complicated way of doing this, its also not updated to 1.8 and is not very willing to help. SO I have tried several attempts at finding a solution to this and have come close but need some help to figure out why its only generating the well to each village and nothing more. If you look at the normal MapGenVillage class, you will see this in the start class section of the code....
public static class Start extends StructureStart
{
/** well ... thats what it does */
private boolean hasMoreThanTwoComponents;
private static final String __OBFID = "CL_00000515";
public Start() {}
public Start(World worldIn, Random p_i2092_2_, int p_i2092_3_, int p_i2092_4_, int p_i2092_5_)
{
super(p_i2092_3_, p_i2092_4_);
List list = StructureVillagePieces.getStructureVillageWeightedPieceList(p_i2092_2_, p_i2092_5_);
StructureVillagePieces.Start start = new StructureVillagePieces.Start(worldIn.getWorldChunkManager(), 0, p_i2092_2_, (p_i2092_3_ << 4) + 2, (p_i2092_4_ << 4) + 2, list, p_i2092_5_);
this.components.add(start);
start.buildComponent(start, this.components, p_i2092_2_);
List list1 = start.field_74930_j;
List list2 = start.field_74932_i;
int l;
while (!list1.isEmpty() || !list2.isEmpty())
{
StructureComponent structurecomponent;
if (list1.isEmpty())
{
l = p_i2092_2_.nextInt(list2.size());
structurecomponent = (StructureComponent)list2.remove(l);
structurecomponent.buildComponent(start, this.components, p_i2092_2_);
}
else
{
l = p_i2092_2_.nextInt(list1.size());
structurecomponent = (StructureComponent)list1.remove(l);
structurecomponent.buildComponent(start, this.components, p_i2092_2_);
}
}
this.updateBoundingBox();
l = 0;
Iterator iterator = this.components.iterator();
while (iterator.hasNext())
{
StructureComponent structurecomponent1 = (StructureComponent)iterator.next();
if (!(structurecomponent1 instanceof StructureVillagePieces.Road))
{
++l;
}
}
this.hasMoreThanTwoComponents = l > 2;
}
and looking at the MapGenScattered feature class you can see that each structure is based on biome as I wish to recreate for the village map gen I have got this to work as so located here on mygithub repo
Youll notice I had stopped at
this.components.add(start);
If I try, and no matter which way of adding
start.buildComponent(start, this.components, p_i2092_2_);
List list1 = start.field_74930_j;
List list2 = start.field_74932_i;
or adding a new method to handle the rest of the code or even pointing to an entirely new class it always ends in a crash. This is the crash and its the same every time no matter how I go about adding the code.
GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
Profiler Position: N/A (disabled)
Player Count: 0 / 8; []
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
Anyhow, Id really like some help. As I said the code on my github works, no crash, just stops generating the village at the well, I get not path or houses at all. Id really appreciate positive help, been stuck on this for a few days now.
Yes, the link above was one of my tutorials, surprised it is still being passed around. It will still work with a little effort and a few tweaks due to no block id anymore. However as stated works great only for simple structures. A village on the other hand, no. Would require a lot of effort and would be more code than a class can handle. If you want to create a village you will need to replace the mapgen in minecraft using forge. However, if you want to add a village to the existing one, you will still need to replace mapgen, but the rest is where I am currently having some issues of my own, adding more than one village class is a bit of work. You will see when I post my request for help.
Bad news is as I stated before I had lost all my previous work though most was recovered from my old github page. So only missing the jungle swamp and xmas villages. They have to be recreated from scratch.
Good news is I am once again working on the mod but with many differences. This will now be as originally intended and that was to pre-generate them in the world as normal villages. I am close to solving a few issues I have with this task and thus far have completed the build on most of the villages now is to just get them all to load in the world at the same time not just one or another. There will be many other features as well from the original mod, villagers for each type of village, paintings in some of the structures, and a few other nice surprises as well. Hoping to have it working soon. I may also leave the blocks in as well for instant generation, have not decided yet, but leaning towards not. This mod was never really intended to be another instant structure mod as there are enough of those around, was just easier at the time and still added a bit of culture to the game. There will be a new mod page when ready and a new name as well.
i do apologize for my lengthy absence from this forum. I have many life changes of which were a major part in my not updating or actively visiting the forum. I have also had some pc related issues among which was a hard drive failure which cost me all my data and source code for this project and others as well. As i have stated in this thread you may freely take on the task of maintaining the mod at your will and desire. However as I have no source code any longer the best way to get it would be to decompile the mod. and if memory serves the best way to do this would be with a mod decompiler (the program I used I cant recall the name) or there was a way to do this with having an environment with 1.6.4 and forge preinstalled for the decompile. I wish you the best and hope that someone can and will do this as I did have a substantial following especially after coolAlias helped with the code to improve generation. I am sure his generation code has improved greatly since then as he had some amazing changes in the code before i was able to implement it to the final build. Should anyone decompile the code please post it here for others that wish to use it or to github. Also post links to the new mod here and link mine to your page.
Had some trouble with my internet recently and back online now though. Code should be up in a day or so. I have a bunch of projects I am bundling all together in a zip. Most code is 1.6.4, I will break down each project by MC version so you can see how far along each project went.
Thank you everyone who enjoyed this mod. I have recently moved to a new home and also have had some life changing events take place over the last 2 months that have made it impossible for me to continue the work on this mod. I just dont have the time anymore and my family needs me more now than ever. My father passed away from cancer early in February, my son has been diagnosed with an illness not to far off from autism. So my life is pretty well consumed and free time for coding has completely vanished.
As soon as I have the chance I will post the code for all my projects on github and provide a link so anyone who wishes to do so can continue my work. This is my free for all permission to have and use my code as you see fit.
In older versions of the topic, there was a guide on which items to use to make certain buildings, now I have to randomly test items, and when it works, I do not know what will dair construction, please come back to this guide!
Its called the build book...and it is still in the mod and works, the only incomplete portion of the book at the moment in the latest build is the recipes and info sections...the activators all work fine.
1
After looking around a bit, I still don't seen any mods involving the addition of new villages. I was working on one that did add several villages to the game, however many life altering events later and I finally have got back to finishing the mod, though its not to share, I am sorry, I will share the code that results in getting more than one village to generate. One reason I wont share the mod is I base edited the code which is frowned upon and its for personal reasons I even finished. I have lost all original portions of the code from years ago and had to start from scratch and it was for my son, whom is no longer with me.
There was another mod at the time called Diversity, by Budd, and if you can find his code on github, it is overly complicated to do what I am about to show you. It is not my code so I can not show you the link. Also it requires more than one class to simply load several villages. In forge, during minecraft 1.6.4 and below, not sure about recent You can only replace the mapgen files, not really add to them if adding the same thing. So, I was looking for the simple solution that would result in doing just this. And it is as follows, minus the loading of the new MapGenVillage, thats up to you how you want to do this. Though once you add the code to load replace the MapGenVillage, this goes in the new class
Create Your New MapGenVillage and copy the original changing the following bits
[/code]
You'll notice thats comes just before the boolean method isSizeable.....
change that to the start method from MapGenScattered Features and remove the code bits for generating the features to look like this
Now, where those bits were, you will replace it with this...
If you make those changes, and make sure the spawn array list at the top contains each biome represented at the start method. Using this will give you four villages total, and using the variance code for desert village you can change the same villages many times. However this will give you four distinct villages if you change the shape and style of each village structure. you can also add more than four, this just gets you started. Dont forget to resgister all the village pieces for each piece class. have fun Sorry for the messy code blocks, it wasn't like that when I was making the tread
0
Okay so aside from some other issues I am having I would like to ask if anyone knows a good tutorial for creating a new block like planks with metadata for the other blocks. I seem to be having trouble getting the registering correct at the moment. Also what happened to the render manager for blocks? in 1.6.4 I had to create a new render ID for my custom furnace and things. Is that still the case. When I use the getRenderType in the block class It crashes. If I dont use it I get some other strange things happen but no texture. Also while that seems to be an issue I also have with a custom flower pot along with the meta does anyone have experience with flower pots?
I should point out that I cant seem to get eclipse to work on this laptop at all. I am have some personal life issues right now but am using a laptop for net access and my main box to code with. So let me know what code you wish to see and I can copy it over. Trying also to get it up to get hub.
0
I wont have time to look into it anytime soon, not till I finish up the first version of the remake of my mod, maybe a few days. An easy test would be to just set a few vanilla blocks and generate that and see if all is working, then Then at least you will know if youre on the right track. Until then hang in there. I created this tutorial out of necessity when I was doing world gen. There were no real tutorials at that point so I feel your pain honestly. Keep plugging away, youll get it. If not I should be done in a few days like I said then I will take a look okay. Could you link me to the tutorials you have used for this so far?
0
Does anyone know if registering villager IDs still work in forge for 1.8?
The forge version I am currently using for 1.8.8 shows its depricated....line in question and all related are the same
VillagerRegistry.instance().registerVillagerId(6);
I need to do this in my mod, otherwise I have to create a whole new entity for each village type and would prefer not to have to do that. I have no idea how to create mobs of any kind.
0
That may be part of the issue, are you registering the world generator properly? I know there have been changes to the way some things have to be registered now. I have just begun to update and recreate my mod and as I am not doing world gen now, but mapgen instead I have not looked into that at all.
0
Thanks for trying to help, I solved the issue.
0
After some time away I have returned to modding and can say this, to a point this tutorial still works. Exceptions are, minecraft no longer uses block IDs, world.setBlock is not the correct way of doing this(though I may be wrong on that partially), and there are API tools for generating single structures using schematic files. After I finish recreating my mod, I plan to come back and remake a few of my tutorials, and this may or may not be one of them. I do apologize for this, however, your best bet is to try and modify or update coolAlias' structure generation tool as ultimately after making this tutorial that was what I had used for my previous generation in my builder mod. It is an excellent tool for creating single structures as it has hooks for just about anything youd want to add to it.
0
You are correct, I am trying to a new village types to the generation. The first and second part of your response I had already done and worked just fine for loading one village only. However, I tried the third part, and while there was no crash, there were also no generated villages. Were you able to get this to work for your mod this way? Perhaps I am missing something. Thank you for your response I will keep trying.
0
Hello fellow modders. I have been re working my old mod to do what I had originally intended and that is to naturally generate the new villages in the world. I have setup all the necessary classes and it works fine if I choose to only generate one village overriding the original mapgenvillage class. I have no issues with this to this end. However, I do not wish to only generate one new village type. In addition to the normal minecraft village, I would like several other village types to generate as well. I have not seen any other examples of this being done with exception of a WIP mod that uses an overly complicated way of doing this, its also not updated to 1.8 and is not very willing to help. SO I have tried several attempts at finding a solution to this and have come close but need some help to figure out why its only generating the well to each village and nothing more. If you look at the normal MapGenVillage class, you will see this in the start class section of the code....
and looking at the MapGenScattered feature class you can see that each structure is based on biome as I wish to recreate for the village map gen I have got this to work as so located here on mygithub repo
Youll notice I had stopped at
If I try, and no matter which way of adding
or adding a new method to handle the rest of the code or even pointing to an entirely new class it always ends in a crash. This is the crash and its the same every time no matter how I go about adding the code.
Anyhow, Id really like some help. As I said the code on my github works, no crash, just stops generating the village at the well, I get not path or houses at all. Id really appreciate positive help, been stuck on this for a few days now.
Thanks in advance.....micro
0
Yes, the link above was one of my tutorials, surprised it is still being passed around. It will still work with a little effort and a few tweaks due to no block id anymore. However as stated works great only for simple structures. A village on the other hand, no. Would require a lot of effort and would be more code than a class can handle. If you want to create a village you will need to replace the mapgen in minecraft using forge. However, if you want to add a village to the existing one, you will still need to replace mapgen, but the rest is where I am currently having some issues of my own, adding more than one village class is a bit of work. You will see when I post my request for help.
0
Good news and some bad...
Bad news is as I stated before I had lost all my previous work though most was recovered from my old github page. So only missing the jungle swamp and xmas villages. They have to be recreated from scratch.
Good news is I am once again working on the mod but with many differences. This will now be as originally intended and that was to pre-generate them in the world as normal villages. I am close to solving a few issues I have with this task and thus far have completed the build on most of the villages now is to just get them all to load in the world at the same time not just one or another. There will be many other features as well from the original mod, villagers for each type of village, paintings in some of the structures, and a few other nice surprises as well. Hoping to have it working soon. I may also leave the blocks in as well for instant generation, have not decided yet, but leaning towards not. This mod was never really intended to be another instant structure mod as there are enough of those around, was just easier at the time and still added a bit of culture to the game. There will be a new mod page when ready and a new name as well.
0
i do apologize for my lengthy absence from this forum. I have many life changes of which were a major part in my not updating or actively visiting the forum. I have also had some pc related issues among which was a hard drive failure which cost me all my data and source code for this project and others as well. As i have stated in this thread you may freely take on the task of maintaining the mod at your will and desire. However as I have no source code any longer the best way to get it would be to decompile the mod. and if memory serves the best way to do this would be with a mod decompiler (the program I used I cant recall the name) or there was a way to do this with having an environment with 1.6.4 and forge preinstalled for the decompile. I wish you the best and hope that someone can and will do this as I did have a substantial following especially after coolAlias helped with the code to improve generation. I am sure his generation code has improved greatly since then as he had some amazing changes in the code before i was able to implement it to the final build. Should anyone decompile the code please post it here for others that wish to use it or to github. Also post links to the new mod here and link mine to your page.
Many thanks
Microjunk
1
1
As soon as I have the chance I will post the code for all my projects on github and provide a link so anyone who wishes to do so can continue my work. This is my free for all permission to have and use my code as you see fit.
0
Its called the build book...and it is still in the mod and works, the only incomplete portion of the book at the moment in the latest build is the recipes and info sections...the activators all work fine.