[Request] Remove all wandering trades
zitherssd opened this issue ยท 5 comments
Remove all wandering trader trades at once.
I am trying to create a custom trading pool for the wandering trader but I order to do that I need to empty the trading pool first and to do that I have to call villagerTrades.removeWanderingTrade() individually for every trade that exists in the game (including those added by other mods) so this list of things that needs to be removed becomes quite large and tedious to create
Can a simple method that removes all avaliable trades be implemented? Thanksss
Game version is 1.16
So I looked into this and there are a few issues.
If we set the list to null, forge breaks when posting an event.
If we empty the list, vanilla crashes because it can't get a positive bound from an empty list (for random).
So unfortunately there isn't a solution that I am comfortable with implementing
can't get a positive bound from an empty list (for random)
sounds like extremely poor implementation, should have checked if the list was empty first :|
sounds like extremely poor implementation, should have checked if the list was empty first :|
Well, they do check if either list is null first, and if it is, don't run the code.
Only issue is, setting the list to null causes a Forge crash since they don't do a null check when posting an event....