Class FabricBlockLootTableProvider
java.lang.Object
net.minecraft.data.server.loottable.BlockLootTableGenerator
net.fabricmc.fabric.api.datagen.v1.provider.FabricBlockLootTableProvider
- All Implemented Interfaces:
FabricLootTableProvider
,DataProvider
,LootTableGenerator
public abstract class FabricBlockLootTableProvider
extends BlockLootTableGenerator
implements FabricLootTableProvider
Extend this class and implement
generate()
.
Register an instance of the class with FabricDataGenerator.Pack.addProvider(net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator.Pack.Factory<T>)
in a DataGeneratorEntrypoint
.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
Fields inherited from class net.minecraft.data.server.loottable.BlockLootTableGenerator
explosionImmuneItems, lootTables, registryLookup, requiredFeatures, SAPLING_DROP_CHANCE, WITH_SHEARS
Fields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR, LOGGER
-
Constructor Summary
ModifierConstructorDescriptionprotected
FabricBlockLootTableProvider
(FabricDataOutput dataOutput, CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(BiConsumer<RegistryKey<LootTable>, LootTable.Builder> biConsumer) void
excludeFromStrictValidation
(Block block) Disable strict validation for the passed block.abstract void
generate()
Implement this method to add block drops.getName()
run
(DataWriter writer) Methods inherited from class net.minecraft.data.server.loottable.BlockLootTableGenerator
addDrop, addDrop, addDrop, addDrop, addDropWithSilkTouch, addDropWithSilkTouch, addPottedPlantDrops, addSurvivesExplosionCondition, addVinePlantDrop, applyExplosionDecay, attachedCropStemDrops, bannerDrops, beehiveDrops, beeNestDrops, candleCakeDrops, candleDrops, copperOreDrops, createSilkTouchCondition, createWithoutSilkTouchCondition, cropDrops, cropStemDrops, doorDrops, drops, drops, drops, drops, dropsNothing, dropsWithProperty, dropsWithShears, dropsWithShears, dropsWithSilkTouch, dropsWithSilkTouchOrShears, flowerbedDrops, glowBerryDrops, lapisOreDrops, leavesDrops, mangroveLeavesDrops, multifaceGrowthDrops, mushroomBlockDrops, nameableContainerDrops, oakLeavesDrops, oreDrops, redstoneOreDrops, seagrassDrops, shortPlantDrops, shulkerBoxDrops, slabDrops, tallPlantDrops
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.fabricmc.fabric.api.datagen.v1.provider.FabricLootTableProvider
withConditions
-
Constructor Details
-
FabricBlockLootTableProvider
protected FabricBlockLootTableProvider(FabricDataOutput dataOutput, CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup)
-
-
Method Details
-
generate
public abstract void generate()Implement this method to add block drops.Use the range of
BlockLootTableGenerator.addDrop(net.minecraft.block.Block, net.minecraft.item.ItemConvertible)
methods to generate block drops.- Specified by:
generate
in classBlockLootTableGenerator
-
excludeFromStrictValidation
Disable strict validation for the passed block. -
accept
- Specified by:
accept
in interfaceLootTableGenerator
- Overrides:
accept
in classBlockLootTableGenerator
-
run
- Specified by:
run
in interfaceDataProvider
-
getName
- Specified by:
getName
in interfaceDataProvider
-