Interface FabricLootTableProvider

All Superinterfaces:
Consumer<BiConsumer<net.minecraft.util.Identifier,net.minecraft.loot.LootTable.Builder>>, net.minecraft.data.DataProvider
All Known Implementing Classes:
FabricBlockLootTableProvider, 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

    JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR
  • Method Summary

    Modifier and Type
    Method
    Description
     
    net.minecraft.loot.context.LootContextType
     
    default void
    run(net.minecraft.data.DataWriter writer)
     
    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 java.util.function.Consumer

    accept, andThen

    Methods inherited from interface net.minecraft.data.DataProvider

    getName
  • 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

      @Internal default void run(net.minecraft.data.DataWriter writer) throws IOException
      Specified by:
      run in interface net.minecraft.data.DataProvider
      Throws:
      IOException