HyperPigeon/Better-Wandering-Trader

Traders loses their Better Wandering Traders offers when another mod uses Fabric API's to add new trades to any villager (due to certain mod loading order)

Closed this issue · 1 comments

I got this issue report on my mod about how having my mod on makes Better Wandering traders loses their better trades.
TelepathicGrunt/RepurposedStructures-Quilt#88

I was confused at first because I don't touch traders at all lol. Instead, I use Fabric API's hook to add to Cartographer trades. But on a hunch, I decided to take a look at TradeOfferHelper.registerVillagerOffers and see what it does. Well, it adds my trade and then calls this method.
image
image

Yep. Any time a mod uses Fabric API's hook to add to villager or trader's offers, it will nuke out all other mod's offers added without using the API if that non-API mod runs after the API copied the original map. The solution is that Better Wandering Trader can get rid of their own mixin and use TradeOfferHelper.registerWanderingTraderOffers to add to trader's offers without fear of it being wiped out by Fabric API.

Super weird choice by the API to do that but oh well. Hope this helps!

Never mind, the fabric api for villager trade sis broken in a lot of other ways that I dropped using it completely. Do not use it lol. Fabric API will need to redo their api for it but for now, our mods work together as I dont use the api for editing trades anymore