Jump to content

Adding villager trades w/o MCEdit


ezeglace

Recommended Posts

I have added a few equivalent to emerald gems (ruby & sapphire) and would like to add them as replacements in trades or possibly allow any of the gems to be accepted in in any given trade. i have searched merchantrecipe, merchantrecipelist, an any othe rclas involving villager trades to no avail.

Link to comment
Share on other sites

Thank you for this, I have found the method that I have been searching for

void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random)

Unfortunately, I have no idea how to use such method, but it seems that i can only add new stuff for emeralds to buy and sell

Link to comment
Share on other sites

Thank you for this, I have found the method that I have been searching for

void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random)

Unfortunately, I have no idea how to use such method, but it seems that i can only add new stuff for emeralds to buy and sell

 

seems like you have to register your own IVillageTradeHandler via registerVillageTradeHandler. then you'd be able to manipulate the merchantrecipelist through it. although i'm not exactly sure what the limits to what you can do with it are (sorry, man, not really in the mood to dig around code right now) so you'll have to see for yourself

Link to comment
Share on other sites

there is nothing saying that it takes emeralds for what is being traded

 

there is. look harder. it's really not that difficult to find considering it's in the same class. anyway, create a new MerchantRecipe (you can specify the buy/sell items in the constructor) then add it to the provided merchant recipe list. although i don't think you can remove the villager's default trades through an IVillageTradeHandler because they're only added after mod trades are added

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.