public interface VillagerRegistry
Multimap<Integer,TradeOfferListMutator> getTradeOfferLevelMap(Career career)
Multimap of the Career's registered
{code level} to TradeOfferListMutators. Note that the map is
immutable and cannot be modified directly.career - The careerdefault Collection<TradeOfferListMutator> getMutatorsForCareer(Career career, int level)
career - The careerlevel - The levelVillagerRegistry addMutator(Career career, int level, TradeOfferListMutator mutator)
TradeOfferListMutator for the given
Career and level. Note that the level
must be at least 1. There can be multiple TradeOfferListMutators
per level.career - The careerlevel - The levelmutator - The mutator to registerVillagerRegistry addMutators(Career career, int level, TradeOfferListMutator mutator, TradeOfferListMutator... mutators)
TradeOfferListMutators for the given
Career and level. Note that the level
must be at least 1. There can be multiple TradeOfferListMutators
per level.career - The careerlevel - The levelmutator - The mutator to registermutators - The additional mutatorsVillagerRegistry setMutators(Career career, int level, List<TradeOfferListMutator> mutators)
TradeOfferListMutator for the given
Career and level. Note that the level
must be at least 1. There can be multiple TradeOfferListMutators
per level. Any previously provided TradeOfferListMutators will
be erased.career - The careerlevel - The levelmutators - The mutators to registerVillagerRegistry setMutators(Career career, Multimap<Integer,TradeOfferListMutator> mutatorMap)
TradeOfferListMutator for the given
Career and level. Note that the level
must be at least 1. There can be multiple TradeOfferListMutators
per level. Any previously provided TradeOfferListMutators will
be erased.career - The careermutatorMap - The mutator mapdefault Collection<TradeOffer> generateTradeOffers(Merchant merchant, Career career, int level, Random random)
merchant - The merchantcareer - The careerlevel - The levelrandom - The randomdefault List<TradeOffer> populateOffers(Merchant merchant, List<TradeOffer> currentOffers, Career career, int level, Random random)
List of TradeOffers with
potentially new TradeOffers based on the
TradeOfferListMutators and level. If there are no
TradeOfferListMutators registered for the desired level
and Career, the list remains unmodified.merchant - The merchantcurrentOffers - The current offerscareer - The careerlevel - The levelrandom - The random to use