Interface PlayerEvent.FillBucket

Enclosing interface:
PlayerEvent

public static interface PlayerEvent.FillBucket
  • Method Summary

    Modifier and Type
    Method
    Description
    CompoundEventResult<net.minecraft.world.item.ItemStack>
    fill(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.phys.HitResult target)
    Invoked when a player attempts to fill a bucket using right-click.
  • Method Details

    • fill

      CompoundEventResult<net.minecraft.world.item.ItemStack> fill(net.minecraft.world.entity.player.Player player, net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.world.phys.HitResult target)
      Invoked when a player attempts to fill a bucket using right-click. You can return a non-PASS interaction result to cancel further processing by other mods.
      Parameters:
      player - The player filling the bucket.
      level - The level the player is in.
      stack - The bucket stack.
      target - The target which the player has aimed at.
      Returns:
      A CompoundEventResult determining the outcome of the event.