Class WandererTradesEvent
java.lang.Object
net.neoforged.bus.api.Event
net.neoforged.neoforge.event.village.WandererTradesEvent
public class WandererTradesEvent
extends net.neoforged.bus.api.Event
WandererTradesEvent is fired during reload by
TagsUpdatedEvent
. It is used to gather the trade lists for the wandering merchant.
It is fired on the NeoForge.EVENT_BUS
.
The wandering merchant picks a few trades from generic
and a single trade from rare
.
To add trades to the merchant, simply add new trades to the list. BasicItemListing
provides a default implementation.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List
<VillagerTrades.ItemListing> protected List
<VillagerTrades.ItemListing> private final RegistryAccess
-
Constructor Summary
ConstructorsConstructorDescriptionWandererTradesEvent
(List<VillagerTrades.ItemListing> generic, List<VillagerTrades.ItemListing> rare) Deprecated, for removal: This API element is subject to removal in a future version.WandererTradesEvent
(List<VillagerTrades.ItemListing> generic, List<VillagerTrades.ItemListing> rare, RegistryAccess registryAccess) -
Method Summary
Modifier and TypeMethodDescription
-
Field Details
-
generic
-
rare
-
registryAccess
-
-
Constructor Details
-
WandererTradesEvent
@Deprecated(forRemoval=true, since="1.21.1") public WandererTradesEvent(List<VillagerTrades.ItemListing> generic, List<VillagerTrades.ItemListing> rare) Deprecated, for removal: This API element is subject to removal in a future version.UseWandererTradesEvent(List, List, RegistryAccess)
instead -
WandererTradesEvent
@Internal public WandererTradesEvent(List<VillagerTrades.ItemListing> generic, List<VillagerTrades.ItemListing> rare, RegistryAccess registryAccess)
-
-
Method Details
-
getGenericTrades
-
getRareTrades
-
getRegistryAccess
-
WandererTradesEvent(List, List, RegistryAccess)
instead