Interface FabricLootTableProvider
- All Superinterfaces:
Consumer<BiConsumer<net.minecraft.util.Identifier,
,net.minecraft.loot.LootTable.Builder>> net.minecraft.data.DataProvider
- All Known Implementing Classes:
FabricBlockLootTableProvider
,FabricBlockLootTablesProvider
,SimpleFabricLootTableProvider
@NonExtendable
public interface FabricLootTableProvider
extends Consumer<BiConsumer<net.minecraft.util.Identifier,net.minecraft.loot.LootTable.Builder>>, net.minecraft.data.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
SHA1
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.loot.context.LootContextType
default void
run
(net.minecraft.data.DataCache cache) default BiConsumer<net.minecraft.util.Identifier,
net.minecraft.loot.LootTable.Builder> withConditions
(BiConsumer<net.minecraft.util.Identifier, net.minecraft.loot.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
-
Field Details
-
GSON
static final com.google.gson.Gson GSON
-
-
Method Details
-
getLootContextType
net.minecraft.loot.context.LootContextType getLootContextType() -
getFabricDataGenerator
FabricDataGenerator getFabricDataGenerator() -
withConditions
default BiConsumer<net.minecraft.util.Identifier,net.minecraft.loot.LootTable.Builder> withConditions(BiConsumer<net.minecraft.util.Identifier, net.minecraft.loot.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 interfacenet.minecraft.data.DataProvider
- Throws:
IOException
-