Interface FabricLootTableProvider
- All Superinterfaces:
DataProvider,LootTableGenerator
- All Known Implementing Classes:
FabricBlockLootTableProvider,FabricEntityLootTableProvider,SimpleFabricLootTableProvider
A base interface for Loot table providers. You should not implement this class directly.
FabricBlockLootTableProvider provides additional features specific to block drop loot tables.
Use SimpleFabricLootTableProvider for a simple abstract class that you can implement to handle standard loot table functions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider> -
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR, LOGGER -
Method Summary
Modifier and TypeMethodDescriptiondefault BiConsumer<RegistryKey<LootTable>, LootTable.Builder> withConditions(BiConsumer<RegistryKey<LootTable>, LootTable.Builder> exporter, ResourceCondition... conditions) Return a new exporter that applies the specified conditions to any loot table it receives.Methods inherited from interface net.minecraft.data.DataProvider
getName, runMethods inherited from interface net.minecraft.data.loottable.LootTableGenerator
accept
-
Method Details
-
withConditions
default BiConsumer<RegistryKey<LootTable>,LootTable.Builder> withConditions(BiConsumer<RegistryKey<LootTable>, LootTable.Builder> exporter, ResourceCondition... conditions) Return a new exporter that applies the specified conditions to any loot table it receives.For block and entity loot tables, use
FabricBlockLootTableGenerator.withConditions(net.fabricmc.fabric.api.resource.conditions.v1.ResourceCondition...)orFabricEntityLootTableGenerator.withConditions(net.fabricmc.fabric.api.resource.conditions.v1.ResourceCondition...)instead, respectively.
-