Jump to content

Recommended Posts

Posted

I have created a custom village, and have just copied minecraft's code for now to get things to work. But I'm unsure on how to get the structure to actually generate. I have done the

MapGenStructureIO.registerStructure...

and the

StructureVillagePieces.registerVillagePieces();

in my main mod class. But what more do I have to do? The vanilla structures are generated in ChunkProviderGenerate.class from what I understand, how do I get my structure to spawn? Would InitMapGenEvent help with this? If so, how do I use it properly?

 

EDIT: I created a custom world type, so things work now. I have a new question though, about these two fields in MapGenVillage:

this.field_82665_g = 32;
this.field_82666_h = 8;

Anyone knows what these do? I think the first one has something to do with distance to other villages, but I'm not sure about the other one.

Posted

Do you want to add buildings to existing villages or create your own villages from scratch?

 

If it's the former, I explain how to do that briefly here.

 

If it's the latter, you may be able to use FML's IWorldGenerator as a wrapper for your MapGenStructure class (since MapGenStructure sets blocks in the World directly rather than using the Block array like other MapGen classes).

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

Do you want to add buildings to existing villages or create your own villages from scratch?

 

If it's the former, I explain how to do that briefly here.

 

If it's the latter, you may be able to use FML's IWorldGenerator as a wrapper for your MapGenStructure class (since MapGenStructure sets blocks in the World directly rather than using the Block array like other MapGen classes).

 

I'm creating my own custom village separate from the vanilla one.

 

Would this be the only way or is there any other way you can think of which doesn't have anything to do with IWorldGenerator (like the vanilla structures as far as I know)?

Posted

ChunkProviderGenerate has a fixed number of fields containing the vanilla structures to generate, but you can replace them with your own using InitMapGenEvent. You may be able to extend MapGenVillage to generate both vanilla villages and your own villages, but it would probably be a fairly hackish solution.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

ChunkProviderGenerate has a fixed number of fields containing the vanilla structures to generate, but you can replace them with your own using InitMapGenEvent. You may be able to extend MapGenVillage to generate both vanilla villages and your own villages, but it would probably be a fairly hackish solution.

Thanks for your help, I ended up creating a new WorldType with a custom ChunkProviderGenerate instead.

 

I have one more thing to ask, maybe you (or someone else who reads this) know the answer. In MapGenVillage, there are two fields:

this.field_82665_g = 32;
this.field_82666_h = 8;

I think the first one has something to to with distance to other villages, correct me if I'm wrong. But I have no idea what the second one does, can anyone help me here?

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.