Interface FabricLootTableProvider
- All Superinterfaces:
Consumer<BiConsumer<Identifier,
,LootTable.Builder>> DataProvider
- All Known Implementing Classes:
FabricBlockLootTableProvider
,SimpleFabricLootTableProvider
@NonExtendable
public interface FabricLootTableProvider
extends Consumer<BiConsumer<Identifier,LootTable.Builder>>, DataProvider
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.
-
Field Summary
Fields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
run
(DataWriter writer) default BiConsumer<Identifier,
LootTable.Builder> withConditions
(BiConsumer<Identifier, LootTable.Builder> exporter, ConditionJsonProvider... 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
-
Method Details
-
getLootContextType
LootContextType getLootContextType() -
getFabricDataGenerator
FabricDataGenerator getFabricDataGenerator() -
withConditions
default BiConsumer<Identifier,LootTable.Builder> withConditions(BiConsumer<Identifier, LootTable.Builder> exporter, ConditionJsonProvider... conditions) Return a new exporter that applies the specified conditions to any loot table it receives. -
run
- Specified by:
run
in interfaceDataProvider
- Throws:
IOException
-