Interface ItemDropProvider

All Known Implementing Classes:
BlockDrops, BlockStateDrops, EntityDrops, LootTableDrops, SimpleDropProvider

public interface ItemDropProvider
Represents a potential outcome from a botany pot, such as the items produced when a crop is harvested.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(BotanyPotContext context, net.minecraft.world.level.Level level, Consumer<net.minecraft.world.item.ItemStack> drops)
    Performs the outcome of the drop provider.
    List<net.minecraft.world.item.ItemStack>
    Provides a list of items that can be produced by the provider.
    Gets the type of the provider.
  • Method Details

    • apply

      void apply(BotanyPotContext context, net.minecraft.world.level.Level level, Consumer<net.minecraft.world.item.ItemStack> drops)
      Performs the outcome of the drop provider.
      Parameters:
      context - The context of the action.
      level - The current game level.
      drops - A consumer that adds produced items to the output.
    • getType

      ItemDropProviderType<?> getType()
      Gets the type of the provider.
      Returns:
      The type of the provider.
    • getDisplayItems

      List<net.minecraft.world.item.ItemStack> getDisplayItems()
      Provides a list of items that can be produced by the provider. These are used to display potential outcomes in recipe viewers like JEI.
      Returns:
      A list of items to display. Can be empty, can not be null.