Posted October 26, 201311 yr 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. http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
October 26, 201311 yr 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
October 28, 201311 yr Author 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. http://s13.postimg.org/z9mlly2av/siglogo.png[/img] My mods (Links coming soon) Cities | Roads | Remula | SilvaniaMod | MoreStats
November 16, 201311 yr 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.