Package net.fabricmc.fabric.api.registry
Class VillagerInteractionRegistries
java.lang.Object
net.fabricmc.fabric.api.registry.VillagerInteractionRegistries
Registries for modifying villager interactions that
villagers have with the world.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Registers an item to be collectable (picked up from item entity) by any profession villagers.static void
Registers an item to be used in a composter by farmer villagers.static void
registerFood
(ItemConvertible item, int foodValue) Registers an item to be edible by villagers.static void
registerGiftLootTable
(VillagerProfession profession, RegistryKey<LootTable> lootTable) Registers a hero of the village gifts loot table to a profession.static void
registerGiftLootTable
(VillagerProfession profession, Identifier lootTable) Deprecated.
-
Method Details
-
registerCollectable
Registers an item to be collectable (picked up from item entity) by any profession villagers.- Parameters:
item
- the item to register
-
registerCompostable
Registers an item to be used in a composter by farmer villagers.- Parameters:
item
- the item to register
-
registerFood
Registers an item to be edible by villagers.- Parameters:
item
- the item to registerfoodValue
- the amount of breeding power the item has (1 = normal food item, 4 = bread)
-
registerGiftLootTable
@Deprecated public static void registerGiftLootTable(VillagerProfession profession, Identifier lootTable) Deprecated. -
registerGiftLootTable
public static void registerGiftLootTable(VillagerProfession profession, RegistryKey<LootTable> lootTable) Registers a hero of the village gifts loot table to a profession.- Parameters:
profession
- the profession to modifylootTable
- the loot table to associate with the profession
-
registerGiftLootTable(VillagerProfession, RegistryKey)
instead.