Interface ICropDropListener

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ICropDropListener
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    generateDrop(Random rng, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, BlockEntityBotanyPot pot, Crop crop, List<net.minecraft.world.item.ItemStack> originalDrops, List<net.minecraft.world.item.ItemStack> drops)
    This listener is invoked when drops for a crop are generated.
  • Method Details

    • generateDrop

      void generateDrop(Random rng, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, BlockEntityBotanyPot pot, Crop crop, List<net.minecraft.world.item.ItemStack> originalDrops, List<net.minecraft.world.item.ItemStack> drops)
      This listener is invoked when drops for a crop are generated.
      Parameters:
      rng - A random number generator that has been seeded with the pots random seed. There are certain scenarios where being able to reproduce the same loot roll is required, to ensure this happens event listeners should always pull randomness from this provided rng source.
      level - The level the pot is in.
      pos - The position of the pot.
      pot - The pot growing the crop.
      crop - The crop being harvested.
      originalDrops - The original drops for the crop.
      drops - The new items to drop.