Class RegisterVillagerTrades

java.lang.Object
net.darkhax.bookshelf.common.api.registry.register.RegisterVillagerTrades

public class RegisterVillagerTrades extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addCommonWanderingTrade(net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
    Adds a trade to the wandering traders common trade pool.
    void
    addRareWanderingTrade(net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
    Adds a trade to the wandering traders rare trades pool.
    void
    addTrade(net.minecraft.world.entity.npc.VillagerProfession profession, int tier, net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
    Adds a new trade listing to a specific profession that may become available when the specified profession tier is reached.
    void
    addTrade(net.minecraft.world.entity.npc.VillagerProfession profession, MerchantTier tier, net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
    Adds a new trade listing to a specific profession that may become available when the specified profession tier is reached.
    void
    addWanderingTrade(net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade, boolean isRare)
    Adds a trade to the wandering villager trade pool.
    List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>
     
    List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing>
     
    Map<net.minecraft.world.entity.npc.VillagerProfession,com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.npc.VillagerTrades.ItemListing>>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RegisterVillagerTrades

      public RegisterVillagerTrades()
  • Method Details

    • addTrade

      public void addTrade(net.minecraft.world.entity.npc.VillagerProfession profession, int tier, net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
      Adds a new trade listing to a specific profession that may become available when the specified profession tier is reached.
      Parameters:
      profession - The profession to register the trade to.
      tier - The tier at which this trade can become available.
      trade - The trade listing to add.
    • addTrade

      public void addTrade(net.minecraft.world.entity.npc.VillagerProfession profession, MerchantTier tier, net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
      Adds a new trade listing to a specific profession that may become available when the specified profession tier is reached.
      Parameters:
      profession - The profession to register the trade to.
      tier - The tier at which this trade can become available.
      trade - The trade listing to add.
    • addWanderingTrade

      public void addWanderingTrade(net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade, boolean isRare)
      Adds a trade to the wandering villager trade pool.
      Parameters:
      trade - The trade to add.
      isRare - If the trade belongs in the rare or common pool.
    • addRareWanderingTrade

      public void addRareWanderingTrade(net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
      Adds a trade to the wandering traders rare trades pool.
      Parameters:
      trade - The trade to add.
    • addCommonWanderingTrade

      public void addCommonWanderingTrade(net.minecraft.world.entity.npc.VillagerTrades.ItemListing trade)
      Adds a trade to the wandering traders common trade pool.
      Parameters:
      trade - The trade to add.
    • getVillagerTrades

      public Map<net.minecraft.world.entity.npc.VillagerProfession,com.google.common.collect.Multimap<Integer,net.minecraft.world.entity.npc.VillagerTrades.ItemListing>> getVillagerTrades()
    • getRareWanderingTrades

      public List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing> getRareWanderingTrades()
    • getCommonWanderingTrades

      public List<net.minecraft.world.entity.npc.VillagerTrades.ItemListing> getCommonWanderingTrades()