Package net.minecraft.data.loot
Class BlockLootSubProvider
java.lang.Object
net.minecraft.data.loot.BlockLootSubProvider
- All Implemented Interfaces:
LootTableSubProvider
- Direct Known Subclasses:
ConditionalLootPools.BlockLoot
,GlobalLootModifiersTest.LootProvider.BlockLoot
,UpdateOneTwentyOneBlockLoot
,VanillaBlockLoot
-
Field Summary
Modifier and TypeFieldDescriptionprotected final FeatureFlagSet
private static final LootItemCondition.Builder
protected static final LootItemCondition.Builder
protected static final LootItemCondition.Builder
private static final LootItemCondition.Builder
protected static final LootItemCondition.Builder
protected final Map<ResourceLocation,
LootTable.Builder> protected static final float[]
private static final float[]
-
Constructor Summary
ModifierConstructorDescriptionprotected
BlockLootSubProvider
(Set<Item> p_249153_, FeatureFlagSet p_251215_) protected
BlockLootSubProvider
(Set<Item> p_281507_, FeatureFlagSet p_283552_, Map<ResourceLocation, LootTable.Builder> p_282212_) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
add
(Block p_251966_, Function<Block, LootTable.Builder> p_251699_) protected void
add
(Block p_250610_, LootTable.Builder p_249817_) protected void
addNetherVinesDropTable
(Block p_252269_, Block p_250696_) protected <T extends ConditionUserBuilder<T>>
TapplyExplosionCondition
(ItemLike p_249717_, ConditionUserBuilder<T> p_248851_) protected <T extends FunctionUserBuilder<T>>
TapplyExplosionDecay
(ItemLike p_248695_, FunctionUserBuilder<T> p_248548_) createAttachedStemDrops
(Block p_249778_, Item p_250678_) protected LootTable.Builder
createBannerDrop
(Block p_249810_) protected static LootTable.Builder
createBeeHiveDrop
(Block p_248770_) protected static LootTable.Builder
createBeeNestDrop
(Block p_250988_) protected static LootTable.Builder
createCandleCakeDrops
(Block p_250280_) protected LootTable.Builder
createCandleDrops
(Block p_250896_) protected static LootTable.Builder
createCaveVinesDrop
(Block p_251070_) protected LootTable.Builder
createCopperOreDrops
(Block p_251306_) protected LootTable.Builder
createCropDrops
(Block p_249457_, Item p_248599_, Item p_251915_, LootItemCondition.Builder p_252202_) protected LootTable.Builder
createDoorTable
(Block p_252166_) protected static LootTable.Builder
createDoublePlantShearsDrop
(Block p_248678_) protected LootTable.Builder
createDoublePlantWithSeedDrops
(Block p_248590_, Block p_248735_) protected LootTable.Builder
createGrassDrops
(Block p_252139_) protected LootTable.Builder
createLapisOreDrops
(Block p_251511_) protected LootTable.Builder
createLeavesDrops
(Block p_250088_, Block p_250731_, float... p_248949_) protected LootTable.Builder
createMangroveLeavesDrops
(Block p_251103_) protected LootTable.Builder
createMultifaceBlockDrops
(Block p_249088_, LootItemCondition.Builder p_251535_) protected LootTable.Builder
createMushroomBlockDrop
(Block p_249959_, ItemLike p_249315_) protected LootTable.Builder
createNameableBlockEntityTable
(Block p_252291_) protected LootTable.Builder
createOakLeavesDrops
(Block p_249535_, Block p_251505_, float... p_250753_) protected LootTable.Builder
createOreDrop
(Block p_250450_, Item p_249745_) protected LootTable.Builder
createPetalsDrops
(Block p_273240_) protected LootTable.Builder
createPotFlowerItemTable
(ItemLike p_249395_) protected LootTable.Builder
createRedstoneOreDrops
(Block p_251906_) protected static LootTable.Builder
createSelfDropDispatchTable
(Block p_252253_, LootItemCondition.Builder p_248764_, LootPoolEntryContainer.Builder<?> p_249146_) protected static LootTable.Builder
createShearsDispatchTable
(Block p_252195_, LootPoolEntryContainer.Builder<?> p_250102_) protected static LootTable.Builder
createShearsOnlyDrop
(ItemLike p_250684_) protected LootTable.Builder
createShulkerBoxDrop
(Block p_252164_) protected static LootTable.Builder
createSilkTouchDispatchTable
(Block p_250203_, LootPoolEntryContainer.Builder<?> p_252089_) protected static LootTable.Builder
createSilkTouchOnlyTable
(ItemLike p_252216_) protected static LootTable.Builder
createSilkTouchOrShearsDispatchTable
(Block p_250539_, LootPoolEntryContainer.Builder<?> p_251459_) createSingleItemTable
(ItemLike p_251912_) protected LootTable.Builder
createSingleItemTable
(ItemLike p_251584_, NumberProvider p_249865_) protected LootTable.Builder
createSingleItemTableWithSilkTouch
(Block p_249305_, ItemLike p_251905_) protected LootTable.Builder
createSingleItemTableWithSilkTouch
(Block p_251449_, ItemLike p_248558_, NumberProvider p_250047_) protected <T extends Comparable<T> & StringRepresentable>
LootTable.BuildercreateSinglePropConditionTable
(Block p_252154_, Property<T> p_250272_, T p_250292_) protected LootTable.Builder
createSlabItemTable
(Block p_251313_) createStemDrops
(Block p_250957_, Item p_249098_) protected void
protected void
dropPottedContents
(Block p_251064_) protected void
protected void
dropWhenSilkTouch
(Block p_250855_) protected abstract void
generate()
void
generate
(BiConsumer<ResourceLocation, LootTable.Builder> p_249322_) static LootTable.Builder
noDrop()
protected void
otherWhenSilkTouch
(Block p_249932_, Block p_252053_)
-
Field Details
-
HAS_SILK_TOUCH
-
HAS_NO_SILK_TOUCH
-
HAS_SHEARS
-
HAS_SHEARS_OR_SILK_TOUCH
-
HAS_NO_SHEARS_OR_SILK_TOUCH
-
explosionResistant
-
enabledFeatures
-
map
-
NORMAL_LEAVES_SAPLING_CHANCES
protected static final float[] NORMAL_LEAVES_SAPLING_CHANCES -
NORMAL_LEAVES_STICK_CHANCES
private static final float[] NORMAL_LEAVES_STICK_CHANCES
-
-
Constructor Details
-
BlockLootSubProvider
-
BlockLootSubProvider
protected BlockLootSubProvider(Set<Item> p_281507_, FeatureFlagSet p_283552_, Map<ResourceLocation, LootTable.Builder> p_282212_)
-
-
Method Details
-
applyExplosionDecay
protected <T extends FunctionUserBuilder<T>> T applyExplosionDecay(ItemLike p_248695_, FunctionUserBuilder<T> p_248548_) -
applyExplosionCondition
protected <T extends ConditionUserBuilder<T>> T applyExplosionCondition(ItemLike p_249717_, ConditionUserBuilder<T> p_248851_) -
createSingleItemTable
-
createSelfDropDispatchTable
protected static LootTable.Builder createSelfDropDispatchTable(Block p_252253_, LootItemCondition.Builder p_248764_, LootPoolEntryContainer.Builder<?> p_249146_) -
createSilkTouchDispatchTable
protected static LootTable.Builder createSilkTouchDispatchTable(Block p_250203_, LootPoolEntryContainer.Builder<?> p_252089_) -
createShearsDispatchTable
protected static LootTable.Builder createShearsDispatchTable(Block p_252195_, LootPoolEntryContainer.Builder<?> p_250102_) -
createSilkTouchOrShearsDispatchTable
protected static LootTable.Builder createSilkTouchOrShearsDispatchTable(Block p_250539_, LootPoolEntryContainer.Builder<?> p_251459_) -
createSingleItemTableWithSilkTouch
-
createSingleItemTable
-
createSingleItemTableWithSilkTouch
protected LootTable.Builder createSingleItemTableWithSilkTouch(Block p_251449_, ItemLike p_248558_, NumberProvider p_250047_) -
createSilkTouchOnlyTable
-
createPotFlowerItemTable
-
createSlabItemTable
-
createSinglePropConditionTable
protected <T extends Comparable<T> & StringRepresentable> LootTable.Builder createSinglePropConditionTable(Block p_252154_, Property<T> p_250272_, T p_250292_) -
createNameableBlockEntityTable
-
createShulkerBoxDrop
-
createCopperOreDrops
-
createLapisOreDrops
-
createRedstoneOreDrops
-
createBannerDrop
-
createBeeNestDrop
-
createBeeHiveDrop
-
createCaveVinesDrop
-
createOreDrop
-
createMushroomBlockDrop
-
createGrassDrops
-
createStemDrops
-
createAttachedStemDrops
-
createShearsOnlyDrop
-
createMultifaceBlockDrops
protected LootTable.Builder createMultifaceBlockDrops(Block p_249088_, LootItemCondition.Builder p_251535_) -
createLeavesDrops
-
createOakLeavesDrops
protected LootTable.Builder createOakLeavesDrops(Block p_249535_, Block p_251505_, float... p_250753_) -
createMangroveLeavesDrops
-
createCropDrops
protected LootTable.Builder createCropDrops(Block p_249457_, Item p_248599_, Item p_251915_, LootItemCondition.Builder p_252202_) -
createDoublePlantShearsDrop
-
createDoublePlantWithSeedDrops
-
createCandleDrops
-
createPetalsDrops
-
createCandleCakeDrops
-
noDrop
-
generate
protected abstract void generate() -
getKnownBlocks
-
generate
- Specified by:
generate
in interfaceLootTableSubProvider
-
addNetherVinesDropTable
-
createDoorTable
-
dropPottedContents
-
otherWhenSilkTouch
-
dropOther
-
dropWhenSilkTouch
-
dropSelf
-
add
-
add
-