Posted August 13, 201411 yr I am making a mob with a trading system like a villager. It has all different attributes and textures and particles and sounds, but it still has the same trading as a villager. I want to only use my custom trades (which I have in the list already) but to remove the other recipes. I already deleted them in my file, but since I am extending EntityVillager (I think this is why) they still have the same recipes in game as a normal villager. How would I remove the trades from my "Villager" and add my new trades?
August 14, 201411 yr Best way would be to not extend EntityVillager, but implement all the trading stuff yourself; otherwise, I suppose you could override updateAITick and getRecipes, both of which end up calling the private method addDefaultEquipmentAndRecipies which is where the villager's trades are determined. Another option would be to utilize VillagerRegistry.manageVillagerTrades to manage trades for a custom villager type (i.e. not any of the vanilla profession IDs) - you could totally clear the passed in List and add whatever you wanted. http://i.imgur.com/NdrFdld.png[/img]
August 14, 201411 yr Author Best way would be to not extend EntityVillager, but implement all the trading stuff yourself; otherwise, I suppose you could override updateAITick and getRecipes, both of which end up calling the private method addDefaultEquipmentAndRecipies which is where the villager's trades are determined. Another option would be to utilize VillagerRegistry.manageVillagerTrades to manage trades for a custom villager type (i.e. not any of the vanilla profession IDs) - you could totally clear the passed in List and add whatever you wanted. Thank you soooo much! I used the method of overriding updateAITick and getRecipes!
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.