Interface IForgeDispensibleContainerItem

All Known Subinterfaces:
DispensibleContainerItem
All Known Implementing Classes:
BucketItem, MobBucketItem, SolidBucketItem

public interface IForgeDispensibleContainerItem
  • Method Details

    • self

      private DispensibleContainerItem self()
    • emptyContents

      default boolean emptyContents(@Nullable @Nullable Player player, Level level, BlockPos pos, @Nullable @Nullable BlockHitResult hitResult, @Nullable @Nullable ItemStack container)
      Empties the contents of the container and returns whether it was successful.
      Parameters:
      player - Player who empties the container. May be null for blocks like dispensers.
      level - Level to place the content in
      pos - The position in the level to empty the content
      hitResult - Hit result of the interaction. May be null for blocks like dispensers.
      container - ItemStack of the container. May be null for backwards compatibility.
      Returns:
      true if emptying the contents of the container was successful, false otherwise