So my goal is to create a custom villager with it's own profession, just one profession, not many like Minecraft's. And in that profession, I want to add my own trades, just the simple 1 for 1 trading. Lastly I want my custom villager's model to be my own model, meaning I don't want to use Minecraft's villager model.
Okay, so, questions on how I can get started.
Will I need to have my entity class extend EntityVillager? How and where do I create my trades and register them? (I hear that the villager trades registry have been finished). What do I need to extend when I render, RenderLivingBase?
Yes you can extend EntityVillager or copy & paste the code in EntityVillager to your entities class so you don't have to extend (you may have to adjust some things). You can modify anything you want from there.
I don't know anything about trades and professions.
Look at RenderVillager and see what that extends.
For the custom model: Do you mean model as in you created or are going to create a custom model using Techne or something? Or you are just going to reskin (custom texture) the villager? I'm asking for clarification.
Rollback Post to RevisionRollBack
I got a mod...go check it out. Its got guns and hats and other stuff.
So I've found this while searching on Google and I've managed to create my own VillagerProfession and VillagerCareer and I've added my own trades to the VillagerCareer field. And I've registered the VillagerProfession in the init phase of Main class using GameRegistry.register, now my question is how do I add my VillagerProfession to my Entity class, I have not yet extended IMerchant in my Entity class, as I'm waiting till I get help on how I can add my VillagerProfession to my Entity class.
public EntityVillager(World worldIn, int professionId)
Instead of professionId try setting it to your custom profession's ID, so all of your custom Villagers have that profession.
I also found in the onInitialSpawn method something that sets a random profession to villagers. Instead of setting a random profession set it to be yours.
Again I don't know anything about professions/trades so I might be wrong. (I only took a quick look at EntityVillager & profession related things.)
For model: If you haven't already import the java file of the model into your workspace or create an empty class (named ModelCustomVillager or something) and copy & paste the java file's code into the class (personally this is what I like to do). You may have to modify some of the code. You'll also need a Renderer then after that do the RenderingRegistry stuff.