Class FabricBlockLootTableProvider
java.lang.Object
net.minecraft.data.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.loottable.BlockLootTableGenerator
explosionImmuneItems, lootTables, registries, requiredFeatures, SAPLING_DROP_CHANCEFields inherited from interface net.minecraft.data.DataProvider
JSON_KEY_SORT_ORDER, JSON_KEY_SORTING_COMPARATOR, LOGGER -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFabricBlockLootTableProvider(FabricDataOutput dataOutput, CompletableFuture<RegistryWrapper.WrapperLookup> registryLookup) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(BiConsumer<RegistryKey<LootTable>, LootTable.Builder> biConsumer) voidexcludeFromStrictValidation(Block block) Disable strict validation for the passed block.abstract voidgenerate()Implement this method to add block drops.getName()run(DataWriter writer) Methods inherited from class net.minecraft.data.loottable.BlockLootTableGenerator
addDrop, addDrop, addDrop, addDrop, addDropWithSilkTouch, addDropWithSilkTouch, addPottedPlantDrops, addSurvivesExplosionCondition, addVinePlantDrop, applyExplosionDecay, attachedCropStemDrops, bannerDrops, beehiveDrops, beeNestDrops, candleCakeDrops, candleDrops, copperOreDrops, createSilkTouchCondition, createWithoutSilkTouchCondition, createWithShearsCondition, cropDrops, cropStemDrops, doorDrops, drops, drops, drops, drops, dropsNothing, dropsWithProperty, dropsWithShears, dropsWithShears, dropsWithSilkTouch, dropsWithSilkTouchOrShears, dropsWithSilkTouchOrShears, glowBerryDrops, lapisOreDrops, leavesDrops, mangroveLeavesDrops, multifaceGrowthDrops, multifaceGrowthDrops, mushroomBlockDrops, nameableContainerDrops, oakLeavesDrops, oreDrops, paleMossCarpetDrops, redstoneOreDrops, seagrassDrops, segmentedDrops, shortPlantDrops, shulkerBoxDrops, slabDrops, tallPlantDropsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
generatein classBlockLootTableGenerator
-
excludeFromStrictValidation
Disable strict validation for the passed block. -
accept
- Specified by:
acceptin interfaceLootTableGenerator- Overrides:
acceptin classBlockLootTableGenerator
-
run
- Specified by:
runin interfaceDataProvider
-
getName
- Specified by:
getNamein interfaceDataProvider
-