Class VillagerTradingManager

java.lang.Object
net.neoforged.neoforge.common.VillagerTradingManager

public class VillagerTradingManager extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final Map<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.npc.VillagerProfession>,it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.world.entity.npc.VillagerTrades.ItemListing[]>>
     
    private static final List<org.apache.commons.lang3.tuple.Pair<net.minecraft.world.entity.npc.VillagerTrades.ItemListing[],Integer>>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static void
     
    private static void
    postVillagerEvents(net.minecraft.core.HolderLookup.Provider registries)
    Posts a VillagerTradesEvent for each registered profession.
    private static void
    postWandererEvent(net.minecraft.core.HolderLookup.Provider registries)
    Posts the WandererTradesEvent.

    Methods inherited from class java.lang.Object

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

    • VANILLA_TRADES

      private static final Map<net.minecraft.resources.ResourceKey<net.minecraft.world.entity.npc.VillagerProfession>,it.unimi.dsi.fastutil.ints.Int2ObjectMap<net.minecraft.world.entity.npc.VillagerTrades.ItemListing[]>> VANILLA_TRADES
    • WANDERER_TRADES

      private static final List<org.apache.commons.lang3.tuple.Pair<net.minecraft.world.entity.npc.VillagerTrades.ItemListing[],Integer>> WANDERER_TRADES
  • Constructor Details

    • VillagerTradingManager

      public VillagerTradingManager()
  • Method Details

    • loadTrades

      static void loadTrades(TagsUpdatedEvent e)
    • postWandererEvent

      private static void postWandererEvent(net.minecraft.core.HolderLookup.Provider registries)
      Posts the WandererTradesEvent.
    • postVillagerEvents

      private static void postVillagerEvents(net.minecraft.core.HolderLookup.Provider registries)
      Posts a VillagerTradesEvent for each registered profession.