Jump to content

Recommended Posts

Posted

As the title says. From googling I've found methods which are a single line of code (and a trade handler class) for adding new villagers with their own texture and trade setups. But, the code I found was old, none of it worked in 1.6

 

Is something like this still possible? I don't need a new building for the village, but I do need him to spawn with other villagers.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

Posted

There are a couple changes, but it's really simple.

 

You need to register a villager using registerVillagerType(id, texture)

 

Id is your villager id number.

 

Texture is a resource location you need to specify in your main mod file. I prefer the preinitialization method to register the villager.

 

That's basically all. You'd need to setup a trade handler to make custom trades with them.

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information
Posted

There are a couple changes, but it's really simple.

 

You need to register a villager using registerVillagerType(id, texture)

 

Id is your villager id number.

 

Texture is a resource location you need to specify in your main mod file. I prefer the preinitialization method to register the villager.

 

That's basically all. You'd need to setup a trade handler to make custom trades with them.

 

Alright thanks. is there a "next available ID" kind of thing for their ID? I don't want to clash with other mods doing the same thing.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

  • 3 weeks later...
Posted

As far as I know, there isn't. Just take a guess for the id. 5 is the farthest Minecraft uses. As long as you make it something greater than 10 (which I think most people will use), you probably won't conflict.

 

(P.S. I'm sorry I didn't realize the previous post was posted until today.)

-Mitchellbrine

 

Minecraft can do ANYTHING, it's coded in Java and you got the full power of Java behind you when you code. So nothing is impossible.

It may be freaking fucking hard though, but still possible ;)

 

If you create a topic on Modder Support, live by this motto:

I don't want your charity, I want your information

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.